SI Agent News
ReportedClaudeOpenAI

Kimi K3.1 Pro integrates directly with Claude Code and Codex

The model's native support for multiple protocols allows it to work with popular coding tools without needing a translation proxy.

1,048,576Kimi K3.1 Pro context window

The short version

Why it matters

This allows developers to swap in a high-performing model into their existing coding workflows without rewriting any software. It simplifies the stack but requires precise configuration to ensure all background tasks actually run.

Native protocol support

Kimi K3.1 Pro is designed to speak three major industry protocols: OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages. This multi-protocol support is the primary reason the model can be dropped into tools like Claude Code and Codex without requiring a translation proxy. Because the tools already speak one of these three languages, Moonshot serves the requests natively.

For example, Claude Code communicates using Anthropic's Messages API, while Codex utilizes the Responses API. Moonshot provides specific endpoints for both of these surfaces. The model ID remains consistent as kimi-k3.1-pro across these different entry points, making the transition relatively seamless for the software.

One important technical detail for users is that the model always reasons by default. There is no toggle to turn this off, and the depth is controlled by a reasoning_effort field. This field accepts low, high, and max settings, though it defaults to max. Additionally, sampling parameters like temperature are fixed at 1.0, meaning previous custom tuning will not carry over.

Configuring Claude Code

Setting up Kimi K3.1 Pro within Claude Code involves editing the environment block in the settings.json file. Users must set the ANTHROPIC_BASE_URL to the Kimi endpoint and provide the correct API key. A common mistake is placing the key in the wrong variable, which leads to authentication errors even if the rest of the config looks correct.

The most critical part of this setup involves the four different model tiers used by Claude Code for various jobs. If any of these tiers are left unset, the tool will fail silently rather than providing a clear error message. This can make the agent feel slow or confused because background tasks like summarization or sub-agent calls simply do nothing.

To ensure a functional setup, users should configure all four tier variables plus the sub-agent model variable in a single edit. It is recommended to point the Haiku tier at a faster, cheaper model while keeping the main conversation on the flagship. After updating these variables, the user must restart Claude Code to apply the changes and verify that sub-agents are actually running.

Codex integration details

Codex uses a different configuration method involving a TOML block in the local config file. To connect to Kimi, users need to define a provider block with the model ID, a provider name, and the base URL. A specific setting called wire_api must be set to 'responses' to enable the direct connection to the Kimi endpoint.

Users also need to manually set the model_context_window to 1,048,576 in this configuration file. If this value is omitted, Codex falls back to default metadata, which can significantly degrade the model's performance on long inputs. The API key itself should stay out of the TOML file and be kept in the system environment variables instead.

There are two specific limitations to keep in mind when using Codex with this model. First, the Codex CLI does not support video inputs, even though the Kimi model itself does. Second, while the context window is large, users should still manage their sessions carefully rather than trying to use the full million tokens for every single interaction.

Routing and pricing

The configurations described above remain valid even if a gateway is used instead of connecting directly to Moonshot. This is helpful for developers who need to call models from different vendors within the same codebase. Using a gateway allows for a single credential to manage the entire catalog and provides a way to move requests between vendors if one hits a rate limit.

As OrcaRouter reported, using a gateway means the model is published under a specific prefixed ID. For Claude Code, this involves updating the base URL to the gateway root and using the provider-prefixed model ID in the tier variables. This setup allows for a fallback plan without needing to change the underlying application code during a launch week.

When using a gateway, users trade away the vendor's specific console and any exclusive beta features. However, the pricing remains transparent as it is passed through from the provider. For Kimi K3.1 Pro, the costs are $2.00 per million input tokens and $10.00 per million output tokens with no additional markup from the gateway.

What to watch

Try it

Perform a POST request to the Kimi Messages or Chat Completions route with a one-token request to verify your API key before configuring your tools.

Sources and links

Liked it? Say why

Add a line for other readers.

No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.

Listen to the AI Wire headlines

Listen to the AI Wire

Listen to our daily AI shows every morning: on your commute, in the shower, wherever you are

Listen to the daily shows

First reported by OrcaRouter · Read the original. Written by the SI Agent News Desk from the reporting above.Written with AI from the source above. Every number is checked against the source. Spot a mistake? Corrections.