Skip to content

Skip cache_control stamping for kimi-k3 - #3

Open
ludoo wants to merge 1 commit into
nnocte:mainfrom
ludoo:kimi-k3-unsupported-cache
Open

Skip cache_control stamping for kimi-k3#3
ludoo wants to merge 1 commit into
nnocte:mainfrom
ludoo:kimi-k3-unsupported-cache

Conversation

@ludoo

@ludoo ludoo commented Aug 28, 2026

Copy link
Copy Markdown

kimi-k3 rejects cache_control, so every request from pi fails with a 400 while the extension is active:

400: {"type":"server_error","message":"Error from provider (Console Go): Upstream request failed: The parameter cache_control is not supported for model moonshotai/kimi-k3. Please try again or contact support if you expect this parameter to be supported."}

This is the GLM problem with a new model and a different error string. The gateway is meant to strip Anthropic-style markers for downstream APIs that do not speak Anthropic, and for kimi-k3 it passes them through instead.

The fix adds kimi-k3 to UNSUPPORTED_CACHE_MODEL_PATTERNS, so the extension skips all stamping and shows opencode-go-cache: unsupported in the footer.

I kept the pattern at kimi-k3 rather than kimi, because kimi-k2.7 accepts cache_control and caches well. A broader match would silently turn caching off for it.

I also updated the known limitations section of the README to name both models and both error messages, and noted that kimi-k3 arrived after the payload-diff test run.

Reproduced on pi with opencode-go/kimi-k3 selected. Every request fails until the model is added to the skip list, and every request succeeds afterwards.

The gateway does not strip Anthropic-style cache_control for kimi-k3, and
the upstream API rejects it:

  400 Upstream request failed: The parameter cache_control is not
  supported for model moonshotai/kimi-k3

Add "kimi-k3" to UNSUPPORTED_CACHE_MODEL_PATTERNS. The pattern is narrow
because kimi-k2.7 accepts cache_control and must keep caching.
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.

1 participant