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
feat(kimi): forward prompt_cache_key on the Kimi Coding Plan presets
Kimi's Chat Completions API documents prompt_cache_key as required for
Kimi Code Plan cache hits (a stable session/task id, unchanged across
exit and resume). Opt the canonical `kimi` OAuth and `kimi-code`
API-key presets into the existing openai-chat forwarding flag so the
caller-supplied key reaches https://api.kimi.com/coding/v1.
The adapter never invents a key: it forwards what the internal request
already carries (Codex's session key on /v1/responses, or the
session-scoped key the Claude /v1/messages inbound derives), an absent
field stays absent, and an explicit provider-level
`promptCacheKey: false` still opts out. All other OpenAI-compatible
presets remain deny-by-default because strict backends reject the
OpenAI-specific field.
Also persist the flag through providerConfigSeed /
enrichProviderFromRegistry like the sibling scalars
(parallelToolCalls, modelSuffixBracketStrip): key-pool 429 rotation
rebuilds the provider from the persisted config rather than the routed
one, so without seeding the retried request would silently drop the
key on exactly the quota-sensitive turns that need affinity most.
Evidence: https://platform.kimi.com/docs/api/chat
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/guides/providers.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,11 @@ 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. |
92
92
93
+
For the canonical Kimi Coding Plan presets (`kimi` account login and `kimi-code` API key),
94
+
opencodex forwards the request's stable `prompt_cache_key` to the Chat Completions request. Kimi
95
+
documents a stable session/task key as required for Kimi Code Plan cache hits; providers that may
96
+
reject the field are left unchanged.
97
+
93
98
You can also start OAuth from the [web dashboard](/guides/web-dashboard/).
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/ru/guides/providers.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,11 @@ ocx logout <provider>
93
93
|`cursor`|`cursor`|`https://api2.cursor.sh`| Экспериментальный PKCE-вход, живой транспорт HTTP/2 и обнаружение моделей с фильтрацией по аккаунту. |
94
94
|`github-copilot`|`openai-chat`|`https://api.githubcopilot.com`| Экспериментально. Device flow GitHub + обмен `copilot_internal` (OAuth-клиент VS Code). Требуется активная подписка Copilot; это не официальный сторонний API. |
95
95
96
+
Для канонических пресетов Kimi Coding Plan (вход через аккаунт `kimi` и API-ключ `kimi-code`)
97
+
opencodex передаёт стабильный `prompt_cache_key` запроса в запрос Chat Completions. Документация
98
+
Kimi требует стабильный ключ сессии/задачи для попаданий в кэш Kimi Code Plan; провайдеры,
99
+
которые могут отклонить это поле, остаются без изменений.
100
+
96
101
OAuth можно запустить и из [веб-дашборда](/ru/guides/web-dashboard/).
0 commit comments