kimi-code/packages/kosong/test
Kai 821847cb4b
feat(managed-kimi-code): route anthropic protocol via beta api (#1186)
* feat(managed-kimi-code): route anthropic protocol via beta api

- kosong: add betaApi option to use client.beta.messages.create
- agent-core: thread alias betaApi into the anthropic provider config
- oauth: route managed models on the anthropic protocol through the beta Messages API

* feat(providers): add KIMI_CODE_CUSTOM_HEADERS support

- Add KIMI_CODE_CUSTOM_HEADERS env var for custom outbound LLM headers
- Send User-Agent to non-Kimi providers
- Forward Kimi identity headers to model catalog fetches
- Support defaultHeaders in Google GenAI provider

* feat(agent-core): add protocol attrs to turn and api error telemetry

- Add type/protocol/alias to api_error for per-protocol error attribution

- Add turn_ended event with reason/duration/mode/type/protocol

- Add type/protocol to turn_interrupted

* chore(oauth): remove hardcoded internal dev endpoint from shared OAuth base URLs

---------

Co-authored-by: haozhe.yang <yanghaozhe@moonshot.ai>
2026-06-29 14:24:01 +08:00
..
e2e fix(kosong): isolate anthropic auth environment (#790) 2026-06-16 14:30:49 +08:00
fixtures refactor: resolve model capabilities via a static table lookup (#776) 2026-06-15 17:58:08 +08:00
providers fix(kosong): repair mismatched schema types from Xcode 26.5 MCP (#343) 2026-06-15 20:47:15 +08:00
anthropic-errors.test.ts feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
anthropic.test.ts feat(managed-kimi-code): route anthropic protocol via beta api (#1186) 2026-06-29 14:24:01 +08:00
capability-providers.test.ts refactor: resolve model capabilities via a static table lookup (#776) 2026-06-15 17:58:08 +08:00
capability.test.ts refactor: resolve model capabilities via a static table lookup (#776) 2026-06-15 17:58:08 +08:00
catalog.test.ts fix(catalog): preserve reasoning fields in custom model (#70) 2026-05-26 17:32:37 +08:00
echo-provider.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
errors.test.ts feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
finish-reason.test.ts fix: prevent streaming tool argument CPU spikes (#29) 2026-05-25 19:49:11 +08:00
generate.test.ts fix: show concise filtered response errors (#456) 2026-06-05 12:48:35 +08:00
google-genai.test.ts feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
kimi-files.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
kimi.test.ts feat: cap completion tokens to remaining context window for chat-completions (#1131) 2026-06-26 19:12:04 +08:00
message.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
openai-common-errors.test.ts feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
openai-legacy.test.ts feat: cap completion tokens to remaining context window for chat-completions (#1131) 2026-06-26 19:12:04 +08:00
openai-responses.test.ts fix: send responses system prompts as instructions (#658) 2026-06-11 19:32:26 +08:00
provider.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
regression.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
scripted-echo-provider.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
simple-toolset.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
step.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
stress.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
tool-message-conversion.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
type-safety-negative.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
type-safety.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
typed-tool.test.ts feat: flatten tool call records (#25) 2026-05-25 23:02:25 +08:00
usage.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00