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
{{ message }}
Repository navigation
[Zen] kimi-k2.7-code: ~50% of sessions get "[NOT_FOUND] Model not found" via provider (Console) — sharded by x-opencode-session, deterministic per session #46011
The failure is sharded by the x-opencode-session header, which makes it look intermittent from the CLI but deterministic per session:
Request withoutx-opencode-session: never fails (100+ probes, 0 failures — including large-context, streaming, and tool-calling payloads).
Request with a randomx-opencode-session: ~50% fail rate (fresh id each request).
Request re-using a session id that failed once: fails every time — which means an affected OpenCode session dies on its first model call and every in-session retry hits the same broken replica, so retries never help.
The model is present in GET /zen/v1/models, and the identical request body succeeds when the header is dropped, so this looks like a routing/replica issue behind Zen (the error text reads like an upstream Vertex-style 404 relayed verbatim), not a catalog or auth problem.
Only kimi-k2.7-code is affected. Under the same session-headered probes: kimi-k2.6, kimi-k2.5, kimi-k3 — 10/10 success each.
Observed from two unrelated egress networks (a hosted Linux box and a Daytona sandbox in Frankfurt), same behavior, so it is not source-IP dependent.
Repro
# 1) No session header — always succeeds:
curl -s https://opencode.ai/zen/v1/chat/completions \
-H "Authorization: Bearer $OPENCODE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"kimi-k2.7-code","messages":[{"role":"user","content":"hi"}],"max_tokens":5}'# 2) With a session header, as the OpenCode client sends — run ~10x, about half fail:foriin$(seq 1 10);do
SES="ses_$(head -c16 /dev/urandom | xxd -p)"
curl -s -o /dev/null -w "$SES %{http_code}\n" https://opencode.ai/zen/v1/chat/completions \
-H "Authorization: Bearer $OPENCODE_API_KEY" \
-H "Content-Type: application/json" \
-H "x-opencode-client: cli" \
-H "user-agent: opencode/1.18.18 ai-sdk/provider-utils/4.0.23 runtime/bun/1.3.14" \
-H "x-opencode-session: $SES" \
-d '{"model":"kimi-k2.7-code","messages":[{"role":"user","content":"hi"}],"max_tokens":5}'done# 3) Take any session id that printed 400 above and repeat it — it fails 100% of the time.
End-to-end: opencode run "Reply with exactly: PONG" (opencode-ai 1.18.18) with "model": "opencode/kimi-k2.7-code" fails ~3/8 invocations with the error above; each failing invocation is one unlucky session.
Example failure rates measured today (fresh random session per request): 6/10, then 6/10 an hour later — stable around 50–60% all day.
Impact
Automated agents pinned to kimi-k2.7-code fail ~half of their sessions with no recovery path, since in-session retries are routed to the same replica. We have repointed our default to kimi-k2.6 as a workaround.
Environment
opencode-ai 1.18.18 (also reproduced with plain curl, so client version is not the variable)
First observed 2026-08-28 ~09:00 UTC; still occurring at time of filing
Thanks for the report! This was a temporary problem with the model's upstream provider around the time it was reported, and there haven't been new reports here since. If you still see it on the latest OpenCode, please open a new issue with your version, model and the exact error. Closing this issue.
Activity
github-actions commentedon Aug 28, 2026
This issue might be a duplicate of or closely related to existing issues. Please check:
x-opencode-sessionsticky routing in Zen causing requests to land on inconsistent upstream providers; same gatewaystickyProvidermechanism identifiedadomurad commentedon Sep 1, 2026
I have the same issue - cannot use kimi-k2.7-code
fix(ia): ciclo cloud tool_call ronda 2 (role tool->user), sesion Zen …
Tarquinen commentedon Oct 20, 2026
Thanks for the report! This was a temporary problem with the model's upstream provider around the time it was reported, and there haven't been new reports here since. If you still see it on the latest OpenCode, please open a new issue with your version, model and the exact error. Closing this issue.
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊