You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(providers): address Codex review on Copilot Responses wire defaults
Move the per-model wire map onto PROVIDER_REGISTRY. A second provider fact
table next to the Copilot seed it had to stay aligned with is exactly the
drift-prone split src/AGENTS.md forbids. `modelWireDefaults` is registry-only
metadata, deliberately not part of ProviderConfigSeed: seeding it into a saved
config would freeze today's map on disk and make it indistinguishable from an
explicit user `modelAdapters` entry, which must always win. A registry
invariant test now pins every default to a seeded model and an allowed wire.
Keep sampling params on routed Responses gateways. Both compat handlers
stripped max_output_tokens for ANY openai-responses route, though the intent —
stated in claude-messages.ts as "routed providers keep them" — was the native
ChatGPT forward path only. Gate it on `authMode === "forward"`, matching the
adapter's own stripUnsupportedForwardParams condition so the two layers agree.
temperature/top_p/stop/user stay stripped on every Responses route: `stop` is
not a Responses parameter, reasoning models reject temperature/top_p, and
noTemperatureModels is honored only by the openai-chat adapter, so there is no
per-model filter on this wire.
Restore credential recovery for routed Responses gateways. Moving a model onto
this wire moves it from the normal adapter loop into the passthrough branch,
which formats non-2xx immediately — so a Copilot model would surface a 401 a
token refresh fixes, or a 429 a healthy pool key absorbs, while its chat-wire
siblings on the same provider still recover. Add a bounded recovery before the
error formatting: one forced OAuth refresh, then one replay per remaining pool
key. Nothing has streamed and the body is a replayable string, the same
precondition the transient-5xx retry relies on. The canonical ChatGPT forward
provider is excluded so its own pool-retry path is untouched.
Also feed registry `modelWireDefaults` and configured `modelAdapters` keys into
knownModelIdsForProvider, so a provider that names a model only in
`modelAdapters` is selectable as `provider/model` and appears in the bare-id
selector hint.
Docs: fix the heading nesting, and carry the gpt-5.4 text-only caveat and the
/chat/completions failure message into the ko/ja/zh-cn/ru locales.
Full suite: 6069 pass, 6 fail — all six also fail on the unmodified base
(claude-desktop-cli x2, cli-help service usage, provider-workspace-auth GUI
grep, decodeSchtasksOutput) except cli-restore-back, which passes in isolation
and times out only under full-suite load.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/guides/providers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ ocx logout <provider>
90
90
|`cursor`|`cursor`|`https://api2.cursor.sh`| Experimental PKCE login, live HTTP/2 transport, and account-filtered model discovery. |
91
91
|`github-copilot`|`openai-chat`|`https://api.githubcopilot.com`| Experimental. GitHub device flow + `copilot_internal` exchange (VS Code OAuth client). Requires an active Copilot subscription; not an official third-party API. The catalog is mixed-wire — see [GitHub Copilot model wires](#github-copilot-model-wires). |
92
92
93
-
####GitHub Copilot model wires
93
+
### GitHub Copilot model wires
94
94
95
95
Copilot's catalog is not uniformly served by `/chat/completions`. The provider adapter stays
96
96
`openai-chat`, which is correct for the Claude, Gemini, GPT-3.5/4 and `gpt-5-mini` entries, but the
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/ru/guides/providers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ ocx logout <provider>
91
91
|`kiro`|`kiro`|`https://runtime.us-east-1.kiro.dev`| Первый вход импортирует существующую сессию после установки Kiro CLI (`curl -fsSL https://cli.kiro.dev/install| bash`) и входа через `kiro-cli login`. **Добавить аккаунт** выполняет выход из `kiro-cli`, запускает новый вход через браузер, переключает аккаунт самого `kiro-cli` и сохраняет метаданные профиля отдельно для каждого аккаунта. Существующие аккаунты OpenCodex сохраняются; при отмене или сбое восстанавливается предыдущая сессия `kiro-cli`. |
92
92
|`google-antigravity`|`google`|`https://daily-cloudcode-pa.googleapis.com`| Google OAuth поверх протокола Cloud Code Assist. |
93
93
|`cursor`|`cursor`|`https://api2.cursor.sh`| Экспериментальный PKCE-вход, живой транспорт HTTP/2 и обнаружение моделей с фильтрацией по аккаунту. |
94
-
|`github-copilot`|`openai-chat`|`https://api.githubcopilot.com`| Экспериментально. Device flow GitHub + обмен `copilot_internal` (OAuth-клиент VS Code). Требуется активная подписка Copilot; это не официальный сторонний API. Каталог смешанный по wire: `gpt-5.3-codex`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.5`, `gpt-5.6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra`отвечают только на Responses API, и opencodex маршрутизирует их через `openai-responses` автоматически. Явная запись `modelAdapters` всегда важнее. Голые имена OpenAI зарезервированы за каноническим провайдером `openai`, поэтому выбирайте модель как `github-copilot/gpt-5.6-sol`. |
94
+
| `github-copilot` | `openai-chat` | `https://api.githubcopilot.com` | Экспериментально. Device flow GitHub + обмен `copilot_internal` (OAuth-клиент VS Code). Требуется активная подписка Copilot; это не официальный сторонний API. Каталог смешанный по wire: `gpt-5.3-codex`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.5`, `gpt-5.6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra` падают на Chat Completions с `model "…" is not accessible via the /chat/completions endpoint`, поэтому opencodex автоматически маршрутизирует их через `openai-responses`. У `gpt-5.4` текстовый запрос к Chat Completions проходит, но реальный запрос Codex с function tools и reasoning effort — нет, поэтому по умолчанию он остаётся на Responses. Остальные модели каталога остаются на `openai-chat`. Явная запись `modelAdapters` всегда важнее. Голые имена OpenAI зарезервированы за каноническим провайдером `openai`, поэтому выбирайте модель командой `codex -m github-copilot/gpt-5.6-sol`. |
95
95
96
96
Для канонических пресетов Kimi Coding Plan (вход через аккаунт `kimi` и API-ключ `kimi-code`)
97
97
opencodex передаёт в запрос Chat Completions только стабильный `prompt_cache_key`, предоставленный
// Copilot's catalog is mixed-wire: `openai-chat` above is right for the Claude, Gemini,
1212
+
// GPT-3.5/4 and gpt-5-mini entries, but these answer only on the Responses API and fail
1213
+
// chat completions with `model "…" is not accessible via the /chat/completions endpoint`.
1214
+
// gpt-5.4 hides it behind a passing smoke test — a text-only chat request succeeds and
1215
+
// only a real Codex request fails, because Codex supplies function tools plus a reasoning
1216
+
// effort. Verified 2026-07-30 with real `codex exec` runs, not minimal text probes:
1217
+
// presence in GET /models proves neither. Recheck when Copilot changes models.
1218
+
modelWireDefaults: {
1219
+
"gpt-5.3-codex": "openai-responses",
1220
+
"gpt-5.4": "openai-responses",
1221
+
"gpt-5.4-mini": "openai-responses",
1222
+
"gpt-5.5": "openai-responses",
1223
+
"gpt-5.6-luna": "openai-responses",
1224
+
"gpt-5.6-sol": "openai-responses",
1225
+
"gpt-5.6-terra": "openai-responses",
1226
+
},
1203
1227
defaultModel: "gpt-4o",
1204
1228
note: "Experimental unofficial Copilot bridge. Logs in via GitHub device flow using the public VS Code OAuth client id, then exchanges for a short-lived Copilot API token (copilot_internal). Requires an active Copilot subscription. GitHub may tighten or revoke this path; do not send confidential material you would not paste into Copilot Chat.",
1205
1229
},
@@ -1246,6 +1270,35 @@ export function providerMatchesRegistryTransport(
0 commit comments