Part of #1.
Goal
Even on the legacy `/chat/completions` path, reasoning models (`gpt-5`, `o1`, `o3`, `o4-mini`) accept a top-level `reasoning_effort` parameter and may return a `choices[].message.reasoning_content` field. copilot-api currently drops both — the type definitions don't even mention them.
Current state
`src/services/copilot/create-chat-completions.ts:127–151` defines `ChatCompletionsPayload` with these fields and no others:
```
messages, model, temperature, top_p, max_tokens, stop, n, stream,
frequency_penalty, presence_penalty, logit_bias, logprobs,
response_format, seed, tools, tool_choice, user
```
`Delta` and `ResponseMessage` types (`create-chat-completions.ts:72–123`) have no `reasoning_content` field.
Grep for `reasoning|reasoning_effort|reasoning_content` across the entire repo → 0 hits.
Tasks
Acceptance criteria
- A client that sends `reasoning_effort: "high"` to `/v1/chat/completions` with `gpt-5` sees the parameter reach upstream (verifiable with `--verbose`)
- A reasoning-content delta returned by upstream appears in the streamed response to the client
- Non-reasoning models (`gpt-4o`) are unaffected
Notes
This is the degraded-mode fallback path. Multi-turn `encrypted_content` round-trip is not possible on `/chat/completions` (that's why #1 exists). But `reasoning_effort` and single-turn `reasoning_content` visibility are still worth having here as a baseline.
Part of #1.
Goal
Even on the legacy `/chat/completions` path, reasoning models (`gpt-5`, `o1`, `o3`, `o4-mini`) accept a top-level `reasoning_effort` parameter and may return a `choices[].message.reasoning_content` field. copilot-api currently drops both — the type definitions don't even mention them.
Current state
`src/services/copilot/create-chat-completions.ts:127–151` defines `ChatCompletionsPayload` with these fields and no others:
```
messages, model, temperature, top_p, max_tokens, stop, n, stream,
frequency_penalty, presence_penalty, logit_bias, logprobs,
response_format, seed, tools, tool_choice, user
```
`Delta` and `ResponseMessage` types (`create-chat-completions.ts:72–123`) have no `reasoning_content` field.
Grep for `reasoning|reasoning_effort|reasoning_content` across the entire repo → 0 hits.
Tasks
Acceptance criteria
Notes
This is the degraded-mode fallback path. Multi-turn `encrypted_content` round-trip is not possible on `/chat/completions` (that's why #1 exists). But `reasoning_effort` and single-turn `reasoning_content` visibility are still worth having here as a baseline.