Part of #1.
Goal
Even on the legacy /chat/completions path, reasoning models accept the top-level reasoning_effort parameter (minimal | low | medium | high) and may return choices[].message.reasoning_content (or delta.reasoning_content in stream). copilot-api currently has neither, so the parameter is dropped on the way in and the field is dropped on the way out.
Current state
Grep "reasoning" (case-insensitive) across the entire repo → 0 hits
ChatCompletionsPayload type at src/services/copilot/create-chat-completions.ts:127–151 has no reasoning_effort field
Delta and ResponseMessage types at src/services/copilot/create-chat-completions.ts:72–123 have no reasoning_content field
- The Anthropic adapter explicitly suppresses
thinking block output: "GitHub Copilot doesn't generate thinking blocks, so we don't include them in responses" (src/routes/messages/non-stream-translation.ts:305)
Tasks
Acceptance criteria
POST /v1/chat/completions with \"reasoning_effort\": \"high\" and \"model\": \"gpt-5\" produces an upstream call that includes that field
- If upstream returns
reasoning_content, the client sees it (non-stream and stream)
- Existing Chat Completions tests still pass
File pointers
src/services/copilot/create-chat-completions.ts:21–29 — payload construction
src/services/copilot/create-chat-completions.ts:72–123 — response/delta types
src/services/copilot/create-chat-completions.ts:127–151 — payload type
- OpenAI docs: https://platform.openai.com/docs/guides/reasoning
Part of #1.
Goal
Even on the legacy
/chat/completionspath, reasoning models accept the top-levelreasoning_effortparameter (minimal | low | medium | high) and may returnchoices[].message.reasoning_content(ordelta.reasoning_contentin stream). copilot-api currently has neither, so the parameter is dropped on the way in and the field is dropped on the way out.Current state
Grep "reasoning"(case-insensitive) across the entire repo → 0 hitsChatCompletionsPayloadtype atsrc/services/copilot/create-chat-completions.ts:127–151has noreasoning_effortfieldDeltaandResponseMessagetypes atsrc/services/copilot/create-chat-completions.ts:72–123have noreasoning_contentfieldthinkingblock output: "GitHub Copilot doesn't generate thinking blocks, so we don't include them in responses" (src/routes/messages/non-stream-translation.ts:305)Tasks
reasoning_effort?: 'minimal' | 'low' | 'medium' | 'high'toChatCompletionsPayloadreasoning_content?: stringtoDeltaandResponseMessagedelta.reasoning_contentto clients (don't drop)thinkingblocks fromreasoning_content(this issue is just the OpenAI-shape side)Acceptance criteria
POST /v1/chat/completionswith\"reasoning_effort\": \"high\"and\"model\": \"gpt-5\"produces an upstream call that includes that fieldreasoning_content, the client sees it (non-stream and stream)File pointers
src/services/copilot/create-chat-completions.ts:21–29— payload constructionsrc/services/copilot/create-chat-completions.ts:72–123— response/delta typessrc/services/copilot/create-chat-completions.ts:127–151— payload type