kimi-code/packages/node-sdk
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
..
examples feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
scripts fix: avoid Windows command shim launches (#591) 2026-06-09 20:20:44 +08:00
src feat(managed-kimi-code): route anthropic protocol via beta api (#1186) 2026-06-29 14:24:01 +08:00
test feat(managed-kimi-code): route anthropic protocol via beta api (#1186) 2026-06-29 14:24:01 +08:00
api-extractor.json Kimi For Coding 2026-05-22 15:54:50 +08:00
CHANGELOG.md ci: release packages (#1124) 2026-06-26 19:17:49 +08:00
package.json ci: release packages (#1124) 2026-06-26 19:17:49 +08:00
README.md Kimi For Coding 2026-05-22 15:54:50 +08:00
tsconfig.api-extractor.json Kimi For Coding 2026-05-22 15:54:50 +08:00
tsconfig.dts.json Kimi For Coding 2026-05-22 15:54:50 +08:00
tsconfig.json feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
tsdown.config.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
vitest.config.ts chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00

@moonshot-ai/kimi-code-sdk

The TypeScript SDK for Kimi Code

Part of the Kimi Code monorepo.

See the main repository for documentation, issues, and contribution guidelines.

License

MIT