Skip to content

fix(agent-core): only send prompt_cache_key to official OpenAI endpoints - #2240

Open
creatiVision wants to merge 17 commits into
MoonshotAI:mainfrom
creatiVision:fix/latest-with-prompt-cache
Open

creatiVision wants to merge 17 commits into
MoonshotAI:mainfrom
creatiVision:fix/latest-with-prompt-cache

Conversation

@creatiVision

@creatiVision creatiVision commented Jul 27, 2026 •

Copy link
Copy Markdown

Related Issue

Resolves #2166 (NVIDIA NIM: 400 Validation: Unsupported parameter(s): prompt_cache_key). Related: #2611 (Azure Foundry: 400 Unrecognized request argument supplied: prompt_cache_key).

Problem

Since v0.29.0 (#1970), every OpenAI-compatible provider receives the session prompt_cache_key in the request body. Strictly-validating endpoints (e.g. NVIDIA NIM, Azure Foundry) reject the unknown parameter with HTTP 400, making custom openai / openai_responses providers unusable for agent sessions.

What changed

The field is now only sent when the effective base URL targets the official OpenAI API (api.openai.com or a regional *.api.openai.com variant, or unset → client default):

  • Added isOfficialOpenAIBaseUrl() helper in packages/agent-core-v2/src/human/llm/requester/bases/openai-base-url.ts.
  • Gated the prompt_cache_key fallback behind it in both the OpenAI chat-completions and Responses bases (openai/format.ts, openai-responses/format.ts). A vendor that supports the field on other hosts keeps encoding it via the cacheKey trait hook (e.g. Kimi), which is unaffected.
  • Tests: cache-key.test.ts (official endpoint keeps the key; third-party endpoint omits it) and response-format.test.ts (Responses base omits it for third-party endpoints).
  • Changeset included.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4c248f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@creatiVision creatiVision mentioned this pull request Jul 27, 2026
5 tasks
@creatiVision
creatiVision force-pushed the fix/latest-with-prompt-cache branch 2 times, most recently from c313025 to 6c9fbe6 Compare August 9, 2026 10:44
@creatiVision
creatiVision force-pushed the fix/latest-with-prompt-cache branch 5 times, most recently from 9cba0aa to d18b4de Compare August 20, 2026 20:11
@creatiVision
creatiVision force-pushed the fix/latest-with-prompt-cache branch 2 times, most recently from 8f1a867 to 2024ea0 Compare August 28, 2026 07:25
@TaylorTWBrown

Copy link
Copy Markdown

I'd love to see this merged soon. I can't use Kimi + Kimi Code on Azure as it is.

@creatiVision

Copy link
Copy Markdown
Author

Rebased and synced with latest main. The merge conflicts resulting from the recent kosong package extraction under packages/agent-core-v2 have been resolved by dropping the obsolete packages/agent-core-v2/src/kosong files.

The PR diff is now clean and focused strictly on gating prompt_cache_key behind isOfficialOpenAIBaseUrl(baseUrl) in packages/agent-core/src/session/provider-manager.ts for both openai and openai_responses providers, along with comprehensive unit tests in runtime-provider.test.ts. All test suites pass.

@creatiVision
creatiVision force-pushed the fix/latest-with-prompt-cache branch from 475f680 to 30e00d4 Compare September 7, 2026 07:15
@creatiVision

Copy link
Copy Markdown
Author

Rebased and synced with latest main. With upstream's removal of the legacy packages/agent-core engine (#3542), the gating logic has been cleanly applied to the active packages/agent-core-v2 engine:

  1. packages/agent-core-v2/src/human/llm/requester/bases/openai-base-url.ts: Implements isOfficialOpenAIBaseUrl() helper targeting api.openai.com / *.api.openai.com (or default unset).
  2. packages/agent-core-v2/src/human/llm/requester/bases/openai/format.ts & openai-responses/format.ts: Gates prompt_cache_key behind isOfficialOpenAIBaseUrl(ctx.model.baseUrl) on fallback when no trait hook overrides it, resolving HTTP 400 rejections on strict third-party endpoints like NVIDIA NIM (Error with models not supporting prompt cache #2166) and Azure Foundry (MS Foundry + Kimi Code 2.7 - 400 Unrecognized request argument supplied: prompt_cache_key #2611).
  3. packages/agent-core-v2/src/human/test/llm/cache-key.test.ts: Verified with unit tests that prompt_cache_key is sent to official endpoints and omitted for third-party endpoints (all tests green, no comments in agent-core-v2).
  4. Changeset included.

All merge conflicts are resolved and the PR is clean, mergeable, and ready for review.

@creatiVision

Copy link
Copy Markdown
Author

Superseded by #3660 — the same v2 gating fix, reconciled onto a single clean branch based on the latest main. Closing this one.

@creatiVision
creatiVision deleted the fix/latest-with-prompt-cache branch September 8, 2026 23:08
@creatiVision creatiVision reopened this Sep 8, 2026
@creatiVision
creatiVision force-pushed the fix/latest-with-prompt-cache branch from 30e00d4 to 0c0ae57 Compare September 8, 2026 23:11
@creatiVision

Copy link
Copy Markdown
Author

Reopened as the canonical PR — the reconciled fix is on fix/latest-with-prompt-cache. The earlier "Superseded by #3660" note is superseded; #3660 is closed instead.

1 similar comment
@creatiVision

Copy link
Copy Markdown
Author

Reopened as the canonical PR — the reconciled fix is on fix/latest-with-prompt-cache. The earlier "Superseded by #3660" note is superseded; #3660 is closed instead.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c0ae57e1e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

"@moonshot-ai/kimi-code": patch
---

Only send the OpenAI prompt cache key to the official OpenAI API; custom OpenAI-compatible endpoints no longer receive the unknown parameter and stop rejecting requests with HTTP 400. No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Shorten the changeset to the behavior change

The clause after the semicolon explains the mechanism and benefit through the unknown parameter and HTTP 400 response, rather than keeping the release note to one short user-facing statement of what changed. Trim the entry to the behavior change alone before it is emitted in the CLI changelog.

AGENTS.md reference: AGENTS.md:L86-L88

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0620582. The changeset entry is now trimmed to the behavior change alone: "Only send the OpenAI prompt cache key to the official OpenAI API." The clause about the unknown parameter and HTTP 400 rejection was removed from the release-note text.

});

describe('openai-responses requester responseFormat', () => {
it('omits prompt_cache_key for third-party endpoints', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move the Responses cache-key test into cache-key.test.ts

This case tests prompt_cache_key behavior rather than response formatting, and an existing cache-key.test.ts already contains the corresponding requester coverage. Keeping the Responses variant here scatters tests for the same component across unrelated suites instead of extending the existing test file.

AGENTS.md reference: AGENTS.md:L61-L62

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0620582. The Responses cache-key test was moved out of response-format.test.ts into the existing cache-key.test.ts (new "openai-responses requester cacheKey" describe block with a responses client stub). The duplicated test was removed from response-format.test.ts, which now only covers response formatting again. cache-key.test.ts: 6 tests, response-format.test.ts: 7 tests, both green.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1d7ac0e2a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@@ -0,0 +1,6 @@
---
"@moonshot-ai/agent-core-v2": patch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the internal package from this changeset

Because this user-visible fix reaches users through the CLI, the required gen-changesets package-selection rule says to list only @moonshot-ai/kimi-code; @moonshot-ai/agent-core-v2 is a private internal package and should not receive its own release entry here. Remove this line and retain the CLI patch entry.

AGENTS.md reference: AGENTS.md:L87-L87

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0620582. Removed the "@moonshot-ai/agent-core-v2": patch line from the changeset frontmatter; only "@moonshot-ai/kimi-code": patch remains, since the fix reaches users through the CLI. Verified with pnpm changeset status.

…t-cache

# Conflicts:
#	packages/agent-core-v2/src/human/llm/requester/bases/openai-responses/requester.ts
#	packages/agent-core-v2/src/human/llm/requester/bases/openai/requester.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0620582c69

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

kwargs =
trait?.encodeCacheKey?.(input.cacheKey, ctx) ?? encodeOpenAIResponsesCacheKey(input.cacheKey);
trait?.encodeCacheKey?.(input.cacheKey, ctx) ??
encodeOpenAIResponsesCacheKey(input.cacheKey, ctx.model.baseUrl);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve cache keys for Kimi Responses requests

When a Kimi model uses the openai_responses protocol, its provider registration supplies kimiConnection but no Responses trait; the connection resolves the base URL to https://api.moonshot.ai/v1, so this fallback now returns {} and silently removes the session prompt_cache_key that these requests previously sent. Kimi's chat-completions route avoids the regression through kimiOpenAITrait.encodeCacheKey, so the Responses route needs an equivalent vendor-specific hook before applying this host gate.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 04511c6. Registered kimiOpenAIResponsesTrait with encodeCacheKey: (key) => ({ prompt_cache_key: key }) for Kimi's openai_responses protocol in both human/llm-kimi and llm-adapter, preserving the session cache key on Kimi Responses requests. Added unit tests in cache-key.test.ts verifying that traits supply the cache key on Responses requests.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T10:32:07.077598Z ade3442 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7152a7f5da

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

}
try {
const hostname = new URL(baseUrl).hostname;
return hostname === 'api.openai.com' || hostname.endsWith('.api.openai.com');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add cache-key opt-in for compatible custom gateways

When the llm-adapter custom-provider path routes an OpenAI/Responses model through a forwarding gateway that accepts or passes through prompt_cache_key, this hostname allowlist makes both default encoders return {} although the same configuration previously sent the session key. The only bypass is a registered internal encodeCacheKey trait (the Kimi special case); the model/provider configuration has no way to select this for an arbitrary gateway, so users silently lose cache affinity or hits. Keep the omission default for strict endpoints, but add a config or env opt-in for compatible gateways.

AGENTS.md reference: AGENTS.md:L102-L104

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 6c990ea. Added KIMI_CODE_OPENAI_PROMPT_CACHE_KEY environment opt-in (1 / true) to isOfficialOpenAIBaseUrl() so custom forwarding gateways can opt into sending prompt_cache_key on both the OpenAI and OpenAI-Responses protocols. Added unit tests in cache-key.test.ts verifying that setting the environment variable sends prompt_cache_key to third-party endpoints for both protocols. Updated the changeset to name the flipped default and state the escape hatch.

@creatiVision

Copy link
Copy Markdown
Author

Rebased and synced with latest upstream main (c9f01f073).

Resolved merge conflicts in packages/agent-core-v2/src/human/llm-kimi/trait.ts, provider.ts, and packages/agent-core-v2/src/llm-adapter/provider/provider-definition.ts:

  • Reconciled upstream's kimiResponsesTrait (completionTokensWhenUnset) with the encodeCacheKey hook (prompt_cache_key), cleanly combining both capabilities into kimiResponsesTrait (while keeping kimiOpenAIResponsesTrait exported as an alias).
  • Gated prompt_cache_key behind isOfficialOpenAIBaseUrl() for third-party OpenAI and OpenAI-Responses endpoints, preventing HTTP 400 validation failures on strict endpoints (NVIDIA NIM, Azure Foundry).
  • Adhered strictly to the repository's comment-free policy across packages/agent-core-v2.
  • All tests passing: src/human/test/llm/cache-key.test.ts (7/7) and test/llm-adapter/protocol/protocolAdapterRegistry.test.ts (21/21).

The PR is conflict-free, mergeable, and ready for review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c990ea9f2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@@ -0,0 +1,15 @@
export function isOfficialOpenAIBaseUrl(baseUrl: string | undefined): boolean {
const optIn = process.env['KIMI_CODE_OPENAI_PROMPT_CACHE_KEY'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the cache-key opt-in environment variable

When a compatible custom OpenAI gateway needs to retain session cache affinity, this new process variable is now the only supported escape hatch, but a repo-wide rg finds it only in this helper, the tests, and the changeset—not in either docs/en/configuration/env-vars.md or its Chinese mirror. After the release note is no longer in front of users, the configuration reference therefore says nothing about how to restore prompt_cache_key or which values are accepted; add the variable to both environment-variable pages.

AGENTS.md reference: AGENTS.md:L94-L96

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 877d7caf7. Added KIMI_CODE_OPENAI_PROMPT_CACHE_KEY documentation to both docs/en/configuration/env-vars.md and docs/zh/configuration/env-vars.md.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 877d7caf72

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@@ -0,0 +1,15 @@
export function isOfficialOpenAIBaseUrl(baseUrl: string | undefined): boolean {
const optIn = process.env['KIMI_CODE_OPENAI_PROMPT_CACHE_KEY'];
if (optIn === '1' || optIn === 'true') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse the documented opt-in case-insensitively

When a user sets KIMI_CODE_OPENAI_PROMPT_CACHE_KEY=TRUE (explicitly allowed by docs/en/configuration/env-vars.md:63 and its Chinese mirror), this exact comparison remains false, so a compatible third-party gateway still silently loses prompt_cache_key; normalize the value before checking it or narrow the documented contract and tests.

AGENTS.md reference: AGENTS.md:L118-L120

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 4229b95d4. isOfficialOpenAIBaseUrl now normalizes KIMI_CODE_OPENAI_PROMPT_CACHE_KEY case-insensitively and trims whitespace (accepting 1, true, yes, on).

@@ -0,0 +1,15 @@
export function isOfficialOpenAIBaseUrl(baseUrl: string | undefined): boolean {
const optIn = process.env['KIMI_CODE_OPENAI_PROMPT_CACHE_KEY'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep endpoint policy out of protocol formatters

Because both cache-key formatters invoke this helper, formatting a request now reads mutable process.env and classifies provider endpoints. The required llm module guide defines format stages as pure and assigns endpoint/env resolution to the provider connection; move this gate into requester/connection composition and keep the format encoders deterministic.

AGENTS.md reference: packages/agent-core-v2/src/human/llm/AGENTS.md:L1-L1

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 4229b95d4. Moved the isOfficialOpenAIBaseUrl endpoint gate out of encodeOpenAICacheKey / encodeOpenAIResponsesCacheKey into requester composition (prepareOpenAIRequest / prepareOpenAIResponsesRequest), keeping protocol format encoders pure and deterministic.

Comment thread docs/en/configuration/env-vars.md Outdated
### `KIMI_CODE_OPENAI_PROMPT_CACHE_KEY`

::: info Added
Added in 0.4.3.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the public CLI version in the Added callout

This page documents Kimi Code CLI, but apps/kimi-code/package.json:3 is version 2.1.1 and this changeset targets that public package; 0.4.3 is instead the already-current version of the private package at packages/agent-core-v2/package.json:3-4. The callout therefore tells users this new variable existed in an unrelated internal release, so remove it until the public release number is known or use the CLI release version, and update the Chinese mirror as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 4229b95d4. Removed the internal package version callout block from both docs/en/configuration/env-vars.md and docs/zh/configuration/env-vars.md.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4229b95d43

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/en/configuration/env-vars.md Outdated

### `KIMI_CODE_OPENAI_PROMPT_CACHE_KEY`

Controls whether `prompt_cache_key` is attached to requests sent to non-official OpenAI endpoints. By default, prompt cache keys are only sent to official OpenAI endpoints (`api.openai.com`) to prevent incompatibilities with third-party proxies and gateways that reject unknown fields.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the Kimi cache-key exception

For type = "kimi" providers (including managed Kimi), kimiResponsesTrait and kimiOpenAITrait always return prompt_cache_key (packages/agent-core-v2/src/human/llm-kimi/trait.ts:78-90), and both requesters use that trait result before the hostname gate. The key therefore remains enabled with this environment variable unset for Kimi's non-OpenAI hosts and for any Kimi base_url override, so saying it is sent only to api.openai.com makes this variable look like a global policy and can mislead users diagnosing a strict Kimi-compatible gateway; qualify the statement as applying only when no provider trait encodes the key.

AGENTS.md reference: AGENTS.md:L98-L100

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 4c248f5ee. Updated both docs/en/configuration/env-vars.md and docs/zh/configuration/env-vars.md to qualify that KIMI_CODE_OPENAI_PROMPT_CACHE_KEY applies when no provider trait explicitly encodes the cache key (for openai and openai_responses providers), noting that dedicated kimi providers always attach prompt_cache_key via their provider trait regardless of endpoint.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error with models not supporting prompt cache

2 participants