Inference APIs

404 model_not_found: moonshotai/kimi-k2-instruct (Groq)

Kimi K2 was the large agentic model on Groq's list, so 404 The model `moonshotai/kimi-k2-instruct` does not exist or you do not have access to it usually hits coding agents and tool-heavy pipelines. Groq retired the original id on 10 October 2025 in favour of moonshotai/kimi-k2-instruct-0905, then retired that one on 15 April 2026 with openai/gpt-oss-120b as the replacement. Apps that followed the first notice broke a second time.

Last verified November 18, 2026 against Groq deprecations, Groq model list · 5 min read

ProviderGroq
HTTP status404 Not Found
Error codemodel_not_found
MessageThe model `moonshotai/kimi-k2-instruct` does not exist or you do not have access to it.
Announced / shut downabout a month before each shutdown / 10 October 2025 (kimi-k2-instruct), 15 April 2026 (kimi-k2-instruct-0905)
When it happensSince the shutdown dates, on any self-serve request that names either id
Can you wait it out?No — the model was retired; the request fails until you change the model or the provider
Short answer
  • Fastest: change the model string to openai/gpt-oss-120b on Groq and raise max_tokens, because it reasons before answering. Different model, so re-check your prompts.
  • Least code change: keep moonshotai/kimi-k2-instruct and change only the base URL; Inference APIs accepts the id and answers with Kimi K2.7 Code.
  • So it does not happen again: read the model id from configuration and add a fallback for 404 and 429.

What happened

Groq's deprecations page lists both notices: moonshotai/kimi-k2-instruct shut down 10 October 2025, replacement moonshotai/kimi-k2-instruct-0905; moonshotai/kimi-k2-instruct-0905 shut down 15 April 2026, replacement openai/gpt-oss-120b. Both applied to all self-serve tiers. Moonshot has since released Kimi K2.7, so the K2 line continues, just not on Groq.

First, find where the id is pinned

The id is often in more places than the one that errored: a default in a settings file, an environment variable on the server, a second call for summarisation or titles, a framework default.

Find every copy of the id
grep -rn -E "moonshotai/kimi-k2-instruct" . --include='*.py' --include='*.ts' --include='*.js' --include='*.json' --include='*.yaml' --include='*.yml' --include='*.toml' --include='*.env*'
# and the places grep cannot see: environment variables on the server, a hosted secrets store, the provider dashboard's default model

Option 1 — switch to Groq's recommended replacement

One string changes and you stay on Groq. What is different about openai/gpt-oss-120b:

  • It reasons before answering; Kimi K2 Instruct did not. Raise max_tokens or send reasoning_effort: "low".
  • It is a smaller model (117B total, 5B active, against K2's 1T total, 32B active). Long agent runs and large tool schemas that K2 handled may need more retries.
  • Context drops to 131K from K2's 262K on Groq.
One string changes
resp = client.chat.completions.create(
    model="openai/gpt-oss-120b",   # was "moonshotai/kimi-k2-instruct"
    max_tokens=800,                 # reasoning counts against it
    messages=[{"role": "user", "content": "Hello"}],
)

Option 2 — keep the old id, change the base URL

Inference APIs accepts moonshotai/kimi-k2-instruct, moonshotai/kimi-k2-instruct-0905 and the short forms as aliases and serves them with Kimi K2.7 Code, Moonshot's current K2 release: the same family and tool-calling habits, a 262,144-token window, at $0.89 / $4.42 per million tokens with cached input at $0.18.

Base URL and key change, model string stays
from openai import OpenAI

client = OpenAI(
    base_url="https://api.inferenceapis.com/v1",   # was https://api.groq.com/openai/v1
    api_key=os.environ["INFERENCE_API_KEY"],
)
resp = client.chat.completions.create(
    model="moonshotai/kimi-k2-instruct",   # the retired Groq id, accepted as an alias
    messages=[{"role": "user", "content": "Hello"}],
)

K2.7 Code thinks before answering by default and returns a reasoning_content field, which K2 Instruct never did. Send reasoning_effort: "none" to get the old direct-answer behaviour, and expect it to be slower per token than Groq's hardware was. For a cheaper text-only agent model, openai/gpt-oss-120b is served here at $0.20 / $0.80. Prices and capabilities: Kimi K2.7 Code here.

Option 3 — stop pinning one provider and one id

Put the model id in configuration and let a 404 or 429 fall through to a second provider. A retirement then degrades to a log line instead of an outage, and you choose when to migrate. LiteLLM's router does this in a few lines; the same shape exists in most frameworks.

LiteLLM proxy: Groq first, fall back on 404/429
# LiteLLM proxy config: Groq first, Inference APIs when Groq answers 404 or 429
model_list:
  - model_name: chat
    litellm_params:
      model: groq/openai/gpt-oss-120b
      api_key: os.environ/GROQ_API_KEY
  - model_name: chat-fallback
    litellm_params:
      model: inferenceapis/openai/gpt-oss-120b
      api_key: os.environ/INFERENCEAPIS_API_KEY

router_settings:
  fallbacks: [{ "chat": ["chat-fallback"] }]

The deprecations tracker lists every Groq retirement with its date and replacement, so you can see the next one coming.

Frequently asked questions

Is Kimi K2.7 Code the same model as kimi-k2-instruct?

No. It is the newest release of the same family, tuned for coding and long agent runs. Prompts written for K2 Instruct work, but outputs differ and thinking is on unless you switch it off.

Why is Groq's replacement a different family?

Groq's list favours models that run well on its hardware. GPT-OSS 120B is small, fast and open, which fits; K2's trillion parameters do not.

Where else is Kimi K2 served?

Moonshot's own platform serves the K2 line, and several open-model hosts serve the weights. The Groq ids are only accepted here, where they alias to K2.7 Code.

Where Inference APIs fits

Option 2 above keeps the old id working with a base-URL change: Inference APIs accepts moonshotai/kimi-k2-instruct and serves it with Kimi K2.7 Code at $0.89 / $4.42 per million tokens, billed per request with no daily cap. Groq's own replacement, openai/gpt-oss-120b, is served here too at $0.20 / $0.80.

Something changed or wrong? Tell us and we will re-verify the entry.