Skip to content

Add support for reasoning models with effort control and reasoning content display#726

Draft
Copilot wants to merge 9 commits into
mainfrom
copilot/add-reasoning-support-ui
Draft

Add support for reasoning models with effort control and reasoning content display#726
Copilot wants to merge 9 commits into
mainfrom
copilot/add-reasoning-support-ui

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

Adds support for OpenAI reasoning models (o1, o3-mini, etc.) with configurable reasoning effort and visible reasoning process.

Backend

  • Added reasoning_effort parameter to ChatCompletionRequest (values: low, medium, high)
  • Added reasoning_content field to ChatCompletionMessage and ChatCompletionDelta
  • Extract reasoning content from model response_metadata in both streaming and non-streaming flows
  • Pass reasoning effort to LLM via extra_body parameter

Frontend

State & Types:

  • Extended ChatOptions, ChatRequest, and response types with optional reasoning fields
  • Added reasoning effort to chat state with persistence

UI Components:

  • Reasoning effort dropdown in chat settings (conditionally visible when model.supports_reasoning === true)
  • Collapsible reasoning section in Answer component (blue-bordered, expandable)

Streaming:

  • Separate buffer for reasoning content during streaming
  • Reasoning displayed before main answer

Example

// Chat settings now include reasoning effort
const options: ChatOptions = {
  system: systemPrompt,
  temperature: 0.7,
  reasoning_effort: "medium"  // Optional, only for reasoning models
};

// Responses include reasoning content
interface ChatResponse {
  answer: string;
  reasoning_content?: string;  // Model's reasoning process
  // ...
}

All changes are backward compatible—non-reasoning models function unchanged.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 2, 2026 13:56
…ing_content

Co-authored-by: Meteord <5181036+Meteord@users.noreply.github.com>
…d collapsible reasoning display

Co-authored-by: Meteord <5181036+Meteord@users.noreply.github.com>
… code readability

Co-authored-by: Meteord <5181036+Meteord@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for reasoning models in frontend and backend Add support for reasoning models with effort control and reasoning content display Feb 2, 2026
Copilot AI requested a review from Meteord February 2, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants