Skip to content

Kimi Code CLI 2.7.0 adds native Amazon Bedrock provider

Moonshot AI's open source coding agent can now authenticate to Amazon Bedrock through the standard AWS credential chain instead of a separate API key.

Draftship Editorial4 min read

Moonshot AI's open source coding agent now has a native route into Amazon Bedrock. In a post on the AWS Machine Learning Blog published on 19 November 2026, the authors describe the Kimi Code CLI Bedrock provider shipped in v2.7.0, which lets the agent sign in with the standard AWS credential chain rather than a separate Bedrock API key. The walkthrough uses Kimi K3.1 Pro Highspeed as its example model, which the post says supports streaming, configurable reasoning, image input and client-side tool calling.

What changed in v2.7.0

Previously, connecting Kimi Code CLI to models on Bedrock meant configuring a generic provider with type = "openai" or type = "openai_responses". That required setting a regional base_url and supplying an Amazon Bedrock API key, either short-term or long-term. The key was an extra credential to obtain and protect.

The native provider drops that. It resolves credentials from your existing AWS authentication workflow, so you can use the default chain or pick a named profile, including one backed by SSO. AWS_PROFILE selects a specific profile.

How the provider handles credentials and routing

The post describes four steps behind the scenes:

  • Credential resolution. Unless a Bedrock API key is explicitly configured, the provider uses the standard AWS credential chain in your environment.
  • Short-lived token generation. It calls @aws/bedrock-token-generator to create a short-term Bedrock API key and renews it when needed. Nothing has to be placed in the Kimi Code config.toml. If you do supply a key through api_key or api_key_env, that takes precedence.
  • Endpoint construction. It reads AWS_REGION or AWS_DEFAULT_REGION and builds the matching bedrock-runtime endpoint for the model's inferred API format. For Kimi models, the post says this resolves to the recommended OpenAI-compatible Chat Completions path.
  • Inference profile call. The model alias maps to a Bedrock model or inference profile ID. The example uses global.moonshotai.kimi-k3.1, where the global. prefix selects the profile and the region decides which endpoint receives the request.

The ephemeral keys the provider generates are valid for up to 12 hours or the length of your AWS session, whichever is shorter. The post also notes that the inferred protocol and endpoint can be overridden per model if the default is not what you want.

What you need before the first request

Four things have to line up: an AWS account with access to the target model and inference profile in a supported source Region, Kimi Code CLI v2.7.0 or later (check with kimi --version), the AWS CLI for the profile and identity commands, and an IAM identity permitted to invoke the model and profile. The optional aws login workflow needs AWS CLI v2.32.0 or later.

The example IAM policy in the post is deliberately narrow. It allows bedrock:CallWithBearerToken only for short-term bearer tokens, bedrock:GetInferenceProfile for the specific profile, and bedrock:InvokeModel plus bedrock:InvokeModelWithResponseStream on both the inference profile and the underlying foundation model, conditioned on the profile ARN. The authors say to substitute your own region and account ID.

What it changes for people building apps

Coding agents sit on the machine that writes the code, not inside your app's runtime, so this change mostly affects how that machine authenticates. If your team already runs on AWS, the agent can inherit the same identity and permission model you use elsewhere, and the post says Bedrock processing stays within the AWS data boundary. AWS recommends short-term credentials over long-term ones, and the authors are explicit that this path reduces reliance on manually managed keys without removing your responsibility to protect credentials and scope permissions.

Limits and open questions

The post does not list which regions serve Kimi K3.1 Pro Highspeed and points readers to the model card instead. It gives no price figures beyond pay-per-token inference and a pointer to Bedrock pricing. It does not say how the provider behaves if token renewal fails mid-session, or whether models other than the Kimi example were tested with the native provider. The post's byline dates it 19 November 2026, while the publisher's metadata shows 20 November 2026. And a request only completes if authentication, authorization, model access and network connectivity all succeed.

For builders choosing where their model runs

If you are assembling an app rather than a terminal agent, the credential question is usually somebody else's problem. Draftship builds and hosts apps from a plain-language description, with a built-in database and user sign-in, and paid plans add a choice of AI model, which you can read about in using the AI chat and choosing a model. Draftship is not affiliated with Moonshot AI or AWS, and nothing here suggests it supports the Bedrock provider described in the post.

Primary sources

This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.

AI coding agents

opencode v2.3.2 fixes GPT-6.2 prompt caching billing

opencode v2.3.2 sends the system prompt as a leading developer message on every Responses route so GPT-6.2 caches it, cutting uncached input per step from about 14,000 tokens to 3 on one Copilot model.