fix(agent-core): only send prompt_cache_key to official OpenAI endpoints - #2240
fix(agent-core): only send prompt_cache_key to official OpenAI endpoints#2240creatiVision wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 30e00d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
c313025 to
6c9fbe6
Compare
9cba0aa to
d18b4de
Compare
8f1a867 to
2024ea0
Compare
|
I'd love to see this merged soon. I can't use Kimi + Kimi Code on Azure as it is. |
|
Rebased and synced with latest The PR diff is now clean and focused strictly on gating |
475f680 to
30e00d4
Compare
|
Rebased and synced with latest
All merge conflicts are resolved and the PR is clean, mergeable, and ready for review. |
Related Issue
Tracking / backup of #2203 (original by @B143KC47).
Resolves #2166.
Related: #2611 (Azure Foundry 400 rejection), #2761.
If #2203 is merged first, this PR can be closed with no further action.
Problem
Since v0.29.0 (#1970), every OpenAI-compatible provider receives the session
prompt_cache_keyin the request body. Strictly-validating endpoints (e.g. NVIDIA NIM atintegrate.api.nvidia.com(#2166) or Azure Foundry (#2611)) reject the unknown parameter with:That makes custom
openai/openai_responsesproviders unusable for agent sessions.What changed
Same fix as #2203, rebased onto current
main:prompt_cache_keywhen the effective base URL targets the official OpenAI API (api.openai.comor*.api.openai.com, or unset → client default).toKosongProviderConfigforopenaiandopenai_responses(isOfficialOpenAIBaseUrl).cacheKey→prompt_cache_keyfallback in OpenAI chat-completions and Responses bases.Checklist
main