- Flatten single-part and multi-part plain-text content arrays on cross-protocol assistant messages to strings in NormalizeCopilotRequest while preserving native Chat arrays, annotated blocks, and multimodal content, and guard Claude empty-string assistant content-to-null conversion behind tool_calls checks.
- Split CopilotExecutor.httpRequest into prepareAuthorizedRequest and doHTTPRequest so RecordAPIRequest runs only after credential and trusted-origin validation, capturing the final post-override wire payload and masked headers without logging direct HttpRequest callers.
- Capture upstream response metadata via RecordAPIResponseMetadata before decompression and header stripping, log non-2xx and non-stream bodies via AppendAPIResponseChunk, and record transport, decode, read, invalid-JSON, upstream-error, and translation failures via RecordAPIResponseError.
- Add request-scoped helps.BindAPIResponseStreamLogger and logging.APIResponseSnapshotter (snapshotted and closed during ResponseWriterWrapper.Finalize) with per-attempt synchronization so asynchronous copilotStream callbacks retain no *gin.Context reference and cannot race with or pollute reused pooled Gin contexts.
- Add regression and race tests covering Copilot Chat assistant text replay, non-stream and SSE stream upstream logging, error paths, payload override finality, multi-attempt retries, and concurrent mid-callback Gin context reuse.
Introduce SourceModelID as the canonical provider-qualified
source behind each published route and store the Devin catalog
with bare IDs, qualifying it only at publication and lookup.
Generalize Copilot's published-route selection, cooldown
migration, websocket matching, and execution resolution to
Devin, and match OAuth settings and payload rules against the
canonical source so aliases and prefixed routes share config.
Handle qualified model IDs from newer Homes, preserve explicit
prefixed alias names, and resolve Devin auto effort against
catalog-supported levels instead of defaulting to high.
Resolve Copilot routes from Home-provided model info when Home is
enabled, allowing models absent from the local catalog to execute,
stream, and count tokens. Attach resolved info before after-auth
interception and skip the local catalog refresh in Home mode.
Expose Copilot device-login completion and model discovery through
the SDK. Fix Codex token counting for string inputs, string message
content, and role-only messages.
Add copilot presets to the registry models catalog and intersect
them with per-account /models capabilities, so usable credentials
get cold-start preset routes before discovery and account data
overrides limits, modalities, thinking and endpoint afterwards.
Replace the persisted metadata catalog with an immutable
in-memory Auth.CopilotCatalog with preset and unavailable
sentinels, preserving or revoking it across reloads, account
and origin changes, and re-resolving routes on each attempt.
Run discovery in a dedicated worker pool with per-account
transport, queued cancellation and skip-persist commits, gate
native-executor plugin models on catalog availability, and
remove login-time catalog fetch and embedded effort lists.
Add cmd/fetch_copilot_models to export the raw upstream /models
response atomically without modifying the stored credential.
BREAKING CHANGE: upstream-only Copilot models without a registry
preset are no longer routed, and the persisted copilot_catalog
metadata, ReadCatalog and string FetchCatalog APIs are removed
Use GeminiTokenCountJSON for Gemini-format requests instead of
falling back to OpenAI usage JSON, and reuse the shared Claude
input_tokens helper for Claude and OpenAI Response formats.
- Publish Copilot catalog and plugin models with native IDs, aliases, and auth prefixes while preserving suffixed routes.
- Route requests through exact registered Copilot models and send the resolved native model upstream.
- Reconcile Copilot model states and route metadata against published routes; document Copilot support in OAuth alias and error configuration.
Add device OAuth login via `--copilot-login`, trusted-endpoint token
exchange, and per-account model catalog discovery with independent
refresh so accounts expose only entitled Chat, Messages, or Responses
routes.
Implement the executor with official CLI parity defaults, cross-protocol
translation, account-scoped thinking, turn linking, and server-side
replay of private reasoning and signatures, keeping payload rules final.