Declare the provider-supported efforts and reuse the canonical minimal-to-low mapping for static GPT-5.4 mini resolution. Preserve xhigh and keep max unavailable.
Declare the Gemini Chat Completions transport and request compatibility in the owning model manifest. Remove the private metadata decoration loop so static catalog selection and forward-compatible synthesis use the same declared contract.
* fix(github-copilot): honor configured request identity
Honor existing provider request headers consistently across model discovery, setup, inference, and embeddings. Preserve the default identity and partition the live catalog by the configured identity.
Co-authored-by: Finn763 <165816600+Finn763@users.noreply.github.com>
* test(github-copilot): real-behavior wire-trace proof for #127965
* fix(github-copilot proof): print on-disk wire-trace.json sha256
* chore(github-copilot proof): drop pr-body.md from PR diff
* fix(github-copilot): finish identity checks and consolidate proof
Complete the typed provider fixture and keep the identity constant private. Retain canonical owner tests and real provider evidence; remove parallel copied mock implementations and generated PR-only traces while preserving the diagnostic commits in ancestry.
Co-authored-by: Finn763 <165816600+Finn763@users.noreply.github.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Finn763 <Finn763@users.noreply.github.com>
* fix(github-copilot): preserve catalog thinking efforts in requests
Unify discovered and bundled capability mapping with the provider thinking policy. Preserve supported xhigh/max Responses efforts and map minimal to the supported low minimum, while respecting explicit account opt-outs and transport limits.
Fixes#107792
Co-authored-by: Pluviobyte <Pluviobyte@users.noreply.github.com>
* fix(github-copilot): resolve nullable thinking policy transport
Accept the public policy API context and resolve missing transports before enforcing Claude and Gemini effort restrictions. Cover undefined and null API values without changing explicit Responses routes.
* refactor(github-copilot): normalize manifest models as one catalog
Use the canonical batch model provider builder after the single-row helper was removed on main. Preserve model transport and compatibility decoration without a legacy API shim.
* refactor(github-copilot): decorate owned catalog rows in place
Keep the normalized manifest batch as the sole owner of runtime rows and apply transport metadata directly, avoiding redundant row copies.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Pluviobyte <Pluviobyte@users.noreply.github.com>
* fix(github-copilot): add timeout to embedding model discovery
* fix(github-copilot): include timeoutMs in discovery request test type
---------
Co-authored-by: chengzhichao-xydt <chengzhichao-xydt@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(github-copilot): allow xhigh and max thinking levels on claude-opus-5
Copilot users could not select thinking levels above `high` on
`claude-opus-5`. Both `/think xhigh` and `/think max` were rejected and the
picker offered only up to `high`, even with `thinkingDefault: "max"` set.
The bundled manifest entry declared no `supportedReasoningEfforts`, so
`resolveCopilotThinkingLevelMap()` in extensions/github-copilot/models.ts
returned undefined and `clampThinkingLevel()` filtered both tiers out.
A user-side `models.providers` overlay cannot fix this: models.ts
short-circuits `resolveCopilotForwardCompatModel()` when the model is
already in the bundled registry, so the only path that applies a
`thinkingLevelMap` is never reached. The native Claude fallback does not
apply either, since model-utils.ts only consults it for
`api === "anthropic-messages"` routes and Copilot resolves through its
OpenAI-compatible transport.
Declares the effort list the same way extensions/opencode already does for
the same model id. Verified on a live account: after this change `xhigh`
and `max` are selectable and accepted at runtime.
* test(github-copilot): cover Opus 5 manifest reasoning levels
---------
Co-authored-by: mitch <mitch@mitchs-MacBook-Pro.local>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Copilot routes Claude over api.*.githubcopilot.com/v1/messages, a real
Anthropic Messages endpoint, but its replay policy returned only
`{ dropThinkingBlocks: true }`. resolveTranscriptPolicy skips the core
transport-family fallback entirely once a provider registers
buildReplayPolicy, so validateAnthropicTurns stayed false and core never
stripped a trailing assistant prefill turn. The next request after
auto-compaction was rejected with 400 "This model does not support
assistant message prefill".
Dispatch on ctx.modelApi and reuse buildStrictAnthropicReplayPolicy for
the Anthropic transport. dropThinkingBlocks stays unconditional so the
#81520 fix holds, and tool-call ids stay owned by wrapCopilotAnthropicStream
so the persisted transcript is not rewritten.
* fix(github-copilot): cancel unread device-flow error bodies before throwing
postGitHubDeviceFlowForm now drops the unread response stream before it
raises on a non-OK HTTP status. GitHub OAuth error responses ship a JSON
body (`{error, error_description}`) that this helper never consumes, so
the underlying fetch connection previously stayed open holding the
payload until the caller's release() ran, keeping the device-flow socket
half-drained on every 4xx/5xx.
Mirrors the recently-merged qqbot/kilocode/tlon fixes for the same
'cancel body before throwing' pattern (#110008, #109950, #112059).
* style(github-copilot): clarify response release ordering
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* feat(plugins): catch code-mode drift between catalogs sharing one model
Adds a contract test that groups bundled catalog rows by shared upstream
model and requires every row in a group to declare compat.codeMode once any
sibling does. Rows sharing a model id group automatically; rows under
different ids opt in with the new manifest-only `upstreamModel` marker.
Moves the kimi catalog into its manifest so the scan can see it, and records
the tier reseller catalogs were silently missing as explicit "capable".
* docs: regenerate docs map for the shared-model code-mode section
* fix(github-copilot): strip encrypted_content from reasoning replay items
* refactor(github-copilot): name replay sanitizer accurately
Use one provider-boundary sanitizer name for both connection-bound IDs and session-bound encrypted reasoning, and assert the final stream payload drops ciphertext.\n\nCo-authored-by: openperf <16864032@qq.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>