Skip to content

MS Foundry + Kimi Code 2.7 - 400 Unrecognized request argument supplied: prompt_cache_key #2611

Description

@mkrzywda

What version of Kimi Code is running?

0.32.0

Which open platform/subscription were you using?

.

Which model were you using?

kimi-k2.7-code

What platform is your computer?

Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 x86_64

What issue are you seeing?

Kimi Code CLI sends prompt_cache_key in a request to an OpenAI-compatible endpoint, and the endpoint rejects it with HTTP 400: Unrecognized request argument supplied: prompt_cache_key.

Config (redacted)

default_model = "azure/kimi-k2.7-code"

[providers.azure-foundry]
type = "openai"
base_url = "https://<redacted>/openai/v1"
api_key = "<redacted>"

[providers.azure-foundry.custom_headers]
api-key = "<redacted>"

[models."azure/kimi-k2.7-code"]
provider = "azure-foundry"
model = "Kimi-K2.7-Code"
max_context_size = 262144
capabilities = [ "thinking", "tool_use", "image_in" ]
reasoning_key = "reasoning_content"

[thinking]
enabled = false



### What steps can reproduce the bug?

### Steps to reproduce

1. Configure provider/model as above.
2. Start a session (simple prompt like test).
3. First LLM turn fails.

### What is the expected behavior?

_No response_

### Additional information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions