Skip to content

Commit 22f473e

Browse files
committed
v0.0.15: Kimi Coding API support, User-Agent header for coding agents
- Add Kimi Coding API base URL (api.kimi.com/coding/v1) - Add User-Agent: claude-code header to oai-runner for Kimi compatibility - Model: kimi-code/kimi-for-coding via oai-runner - Also supports regular Kimi API (api.moonshot.ai/v1)
1 parent 5a90b5d commit 22f473e

5 files changed

Lines changed: 7 additions & 3 deletions

File tree

.ao/workflows/custom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ agents:
693693

694694
kimi-default:
695695
system_prompt: "You are an expert Rust developer working on the AO CLI workspace. Follow existing code patterns. Write clean, tested code."
696-
model: openrouter/moonshotai/kimi-k2.5
696+
model: kimi-code/kimi-for-coding
697697
tool: oai-runner
698698

699699
opus-default:

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/oai-runner/src/api/client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ impl ApiClient {
162162
.post(url)
163163
.header("Authorization", format!("Bearer {}", self.api_key))
164164
.header("Content-Type", "application/json")
165+
.header("User-Agent", "claude-code/2.1.80")
165166
.json(request)
166167
.send()
167168
.await?;

crates/oai-runner/src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ fn infer_api_base(normalized_model: &str) -> Result<String> {
5858
if normalized_model.starts_with("openrouter/") {
5959
return Ok("https://openrouter.ai/api/v1".to_string());
6060
}
61+
if normalized_model.starts_with("kimi-code/") || (normalized_model.contains("kimi") && normalized_model.contains("code")) {
62+
return Ok("https://api.kimi.com/coding/v1".to_string());
63+
}
6164
if normalized_model.starts_with("kimi/") || normalized_model.starts_with("moonshot/") || normalized_model.contains("kimi") {
6265
return Ok("https://api.moonshot.ai/v1".to_string());
6366
}

crates/orchestrator-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "orchestrator-cli"
3-
version = "0.0.14"
3+
version = "0.0.15"
44
edition = "2021"
55

66
[[bin]]

0 commit comments

Comments
 (0)