Repository navigation
feat(kimi): add Kimi K3 context variants - #1989
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 14 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (25)
📝 WalkthroughWalkthroughChangesKimi K3 and high-speed coding variants are added to Moonshot and Kimi Code catalogs. Runtime limits, route-option disambiguation, provider reasoning, OpenAI shim routing, compression, and related tests are updated. Kimi catalog and routing
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/integrations/runtimeMetadata.test.ts`:
- Around line 300-305: Add a provider-path test in the relevant runtime metadata
test alongside the catalog assertion, selecting kimi-for-coding-highspeed with
https://api.kimi.com/coding/v1 and asserting it resolves to the highspeed API
model while inheriting the kimi-for-coding runtime limits and reasoning
metadata.
In `@src/utils/model/modelOptions.ts`:
- Around line 926-932: Add a focused regression test for getCatalogOptionValue
covering duplicate K3 entries such as k3-256k and k3-1m, and verify each stored
value resolves back to its own entry ID rather than the first shared k3 entry.
Keep the existing buildRouteCatalogModelOptions coverage unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b5daa219-d35d-4c4c-8a6f-0a0bb1a9bcae
📒 Files selected for processing (9)
src/integrations/gateways/kimi-code.tssrc/integrations/models/kimi.tssrc/integrations/runtimeMetadata.test.tssrc/integrations/runtimeMetadata.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/utils/model/modelOptions.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/model/routeCatalogOptions.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
- GitHub Check: web
- GitHub Check: smoke-and-tests (24.11.x)
- GitHub Check: typecheck
- GitHub Check: smoke-and-tests (22)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
TypeScript code in this repository must use strict mode and ESM imports.
**/*.{ts,tsx}: When changing provider behavior, avoid breaking third-party providers and test the exact provider/model path changed when possible.
Runbun run typecheckandbun run typecheck:type-testsfor TypeScript changes.
Run provider tests and provider recommendation tests when changing provider behavior:bun run test:providerandbun run test:provider-recommendation.
Files:
src/integrations/models/kimi.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/gateways/kimi-code.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/integrations/runtimeMetadata.tssrc/integrations/runtimeMetadata.test.tssrc/utils/model/modelOptions.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: Keep changes focused on one problem or feature and avoid mixing unrelated cleanup into the same change.
Preserve existing repository patterns unless intentionally refactoring them.
Update documentation when setup, commands, or user-facing behavior changes.
Review AI-generated changes for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting them.
Follow the existing code style in touched files.
Prefer small, readable changes over broad rewrites.
Do not reformat unrelated files.
Keep comments useful and concise.
Provider changes must explicitly identify affected providers, limitations, and follow-up work in the pull request description.
Do not assign or use provider tags; provider tags are controlled by maintainers.
Run the relevant validation checks locally before submitting changes; pull requests must pass CI checks.
Runbun run security:pr-scanbefore submitting a pull request.
Dependency changes require a concrete project benefit, such as fixing a bug, addressing a security issue, or supporting an approved feature.
Do not change the project's language, core runtime, or dependency stack without prior maintainer agreement.
Files:
src/integrations/models/kimi.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/gateways/kimi-code.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/integrations/runtimeMetadata.tssrc/integrations/runtimeMetadata.test.tssrc/utils/model/modelOptions.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/models/kimi.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/gateways/kimi-code.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/integrations/runtimeMetadata.tssrc/integrations/runtimeMetadata.test.tssrc/utils/model/modelOptions.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Add or update tests when a code change affects behavior.
Files:
src/integrations/models/kimi.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/gateways/kimi-code.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/integrations/runtimeMetadata.tssrc/integrations/runtimeMetadata.test.tssrc/utils/model/modelOptions.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/models/kimi.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/gateways/kimi-code.tssrc/services/api/providerConfig.test.tssrc/integrations/runtimeMetadata.tssrc/integrations/runtimeMetadata.test.tssrc/utils/model/modelOptions.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/utils/model/routeCatalogOptions.test.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/integrations/runtimeMetadata.test.ts
🔇 Additional comments (8)
src/integrations/gateways/kimi-code.ts (1)
36-40: LGTM!src/integrations/models/kimi.ts (1)
32-32: LGTM!src/integrations/runtimeMetadata.ts (1)
55-58: LGTM!src/integrations/runtimeMetadata.test.ts (1)
306-321: LGTM!src/services/api/providerConfig.test.ts (1)
40-49: LGTM!src/utils/context.test.ts (1)
804-823: LGTM!src/utils/model/routeCatalogOptions.ts (1)
54-64: LGTM!src/utils/model/routeCatalogOptions.test.ts (1)
32-39: LGTM!
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/integrations/gateways/kimi-code.ts`:
- Around line 36-40: Update the Kimi Code provider’s defaultModel configuration
from kimi-for-coding to k3 so the catalog’s K3 entry is selected by default. Add
a focused assertion verifying the exact Kimi Code provider/model default route
resolves to k3.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6e26660a-fcef-4fb8-9d95-f72ef4eda522
📒 Files selected for processing (8)
src/integrations/gateways/kimi-code.tssrc/integrations/models/kimi.tssrc/integrations/runtimeMetadata.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/utils/effort.codex.test.tssrc/utils/model/routeCatalogOptions.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: smoke-and-tests (24.11.x)
- GitHub Check: typecheck
- GitHub Check: smoke-and-tests (22)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
TypeScript code in this repository must use strict mode and ESM imports.
**/*.{ts,tsx}: When changing provider behavior, avoid breaking third-party providers and test the exact provider/model path changed when possible.
Runbun run typecheckandbun run typecheck:type-testsfor TypeScript changes.
Run provider tests and provider recommendation tests when changing provider behavior:bun run test:providerandbun run test:provider-recommendation.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/models/kimi.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/utils/effort.codex.test.tssrc/integrations/runtimeMetadata.test.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: Keep changes focused on one problem or feature and avoid mixing unrelated cleanup into the same change.
Preserve existing repository patterns unless intentionally refactoring them.
Update documentation when setup, commands, or user-facing behavior changes.
Review AI-generated changes for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting them.
Follow the existing code style in touched files.
Prefer small, readable changes over broad rewrites.
Do not reformat unrelated files.
Keep comments useful and concise.
Provider changes must explicitly identify affected providers, limitations, and follow-up work in the pull request description.
Do not assign or use provider tags; provider tags are controlled by maintainers.
Run the relevant validation checks locally before submitting changes; pull requests must pass CI checks.
Runbun run security:pr-scanbefore submitting a pull request.
Dependency changes require a concrete project benefit, such as fixing a bug, addressing a security issue, or supporting an approved feature.
Do not change the project's language, core runtime, or dependency stack without prior maintainer agreement.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/models/kimi.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/utils/effort.codex.test.tssrc/integrations/runtimeMetadata.test.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/models/kimi.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/utils/effort.codex.test.tssrc/integrations/runtimeMetadata.test.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Add or update tests when a code change affects behavior.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/models/kimi.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/utils/effort.codex.test.tssrc/integrations/runtimeMetadata.test.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/models/kimi.tssrc/services/api/providerConfig.test.tssrc/integrations/runtimeMetadata.test.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/utils/model/routeCatalogOptions.test.tssrc/services/api/providerConfig.test.tssrc/utils/context.test.tssrc/utils/effort.codex.test.tssrc/integrations/runtimeMetadata.test.ts
🔇 Additional comments (7)
src/integrations/runtimeMetadata.test.ts (1)
309-330: The previous highspeed provider-path coverage gap remains.The test now lists
kimi-for-coding-highspeed, but still does not resolve it throughhttps://api.kimi.com/coding/v1or verify its API model and inherited runtime metadata. Add that exact provider-path assertion.As per coding guidelines, behavior changes require tests; as per path instructions, provider/model changes should test the exact provider/model route.
Sources: Coding guidelines, Path instructions
src/integrations/models/kimi.ts (1)
32-32: 🎯 Functional CorrectnessVerify that K3 preserves Kimi brand metadata.
The existing
kimiModel()helper setsbrandId: 'kimi', but the new descriptor bypasses that helper and omitsbrandId. Unless this is intentional, K3 may be excluded from brand-based grouping or recommendations; preserve the field and add a regression assertion.src/integrations/vendors/moonshot.ts (1)
37-37: LGTM!src/utils/effort.codex.test.ts (1)
476-476: LGTM!Also applies to: 530-540
src/services/api/providerConfig.test.ts (1)
41-48: LGTM!src/utils/context.test.ts (1)
804-814: LGTM!Also applies to: 816-822
src/utils/model/routeCatalogOptions.test.ts (1)
32-39: LGTM!
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/services/api/openaiShim.compression.test.ts`:
- Around line 156-167: Update captureRequestBody to snapshot
CLAUDE_CODE_AUTO_COMPACT_WINDOW and CLAUDE_CODE_MAX_OUTPUT_TOKENS before
modifying them, then wrap the request/capture operation in a try/finally that
restores each environment variable exactly, preserving whether it was unset or
had an empty/string value even when the request throws.
In `@src/services/api/providerConfig.ts`:
- Around line 1003-1018: Update the reasoning validation near requestedReasoning
and isKimiCodeK3 so every applicable selected catalog entry, including direct
Moonshot K3, rejects efforts not present in its declared reasoning.levels while
preserving valid levels and existing max-support behavior; add invalid-level
regression cases in src/services/api/providerConfig.test.ts at lines 76-86 using
https://api.moonshot.ai/v1.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1ef53003-0e32-48d9-baa1-47967efad281
📒 Files selected for processing (17)
src/integrations/gateways/kimi-code.tssrc/integrations/models/kimi.test.tssrc/integrations/models/kimi.tssrc/integrations/runtimeMetadata.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/services/api/client.tssrc/services/api/openaiShim.compression.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.test.tssrc/services/api/providerConfig.tssrc/utils/effort.codex.test.tssrc/utils/effort.tssrc/utils/model/modelOptions.gateways.test.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/model/routeCatalogOptions.tssrc/utils/providerProfiles.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: smoke-and-tests (22)
- GitHub Check: smoke-and-tests (24.11.x)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
TypeScript code in this repository must use strict mode and ESM imports.
**/*.{ts,tsx}: When changing provider behavior, avoid breaking third-party providers and test the exact provider/model path changed when possible.
Runbun run typecheckandbun run typecheck:type-testsfor TypeScript changes.
Run provider tests and provider recommendation tests when changing provider behavior:bun run test:providerandbun run test:provider-recommendation.
Files:
src/integrations/models/kimi.test.tssrc/integrations/vendors/moonshot.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/providerProfiles.test.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/modelOptions.gateways.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/models/kimi.tssrc/services/api/client.test.tssrc/utils/effort.codex.test.tssrc/services/api/openaiShim.compression.test.tssrc/utils/effort.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: Keep changes focused on one problem or feature and avoid mixing unrelated cleanup into the same change.
Preserve existing repository patterns unless intentionally refactoring them.
Update documentation when setup, commands, or user-facing behavior changes.
Review AI-generated changes for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting them.
Follow the existing code style in touched files.
Prefer small, readable changes over broad rewrites.
Do not reformat unrelated files.
Keep comments useful and concise.
Provider changes must explicitly identify affected providers, limitations, and follow-up work in the pull request description.
Do not assign or use provider tags; provider tags are controlled by maintainers.
Run the relevant validation checks locally before submitting changes; pull requests must pass CI checks.
Runbun run security:pr-scanbefore submitting a pull request.
Dependency changes require a concrete project benefit, such as fixing a bug, addressing a security issue, or supporting an approved feature.
Do not change the project's language, core runtime, or dependency stack without prior maintainer agreement.
Files:
src/integrations/models/kimi.test.tssrc/integrations/vendors/moonshot.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/providerProfiles.test.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/modelOptions.gateways.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/models/kimi.tssrc/services/api/client.test.tssrc/utils/effort.codex.test.tssrc/services/api/openaiShim.compression.test.tssrc/utils/effort.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/models/kimi.test.tssrc/integrations/vendors/moonshot.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/providerProfiles.test.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/modelOptions.gateways.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/models/kimi.tssrc/services/api/client.test.tssrc/utils/effort.codex.test.tssrc/services/api/openaiShim.compression.test.tssrc/utils/effort.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Add or update tests when a code change affects behavior.
Files:
src/integrations/models/kimi.test.tssrc/integrations/vendors/moonshot.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/providerProfiles.test.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/modelOptions.gateways.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/models/kimi.tssrc/services/api/client.test.tssrc/utils/effort.codex.test.tssrc/services/api/openaiShim.compression.test.tssrc/utils/effort.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/models/kimi.test.tssrc/integrations/vendors/moonshot.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/providerProfiles.test.tssrc/integrations/gateways/kimi-code.tssrc/utils/model/modelOptions.gateways.test.tssrc/utils/model/routeCatalogOptions.tssrc/integrations/models/kimi.tssrc/services/api/client.test.tssrc/services/api/openaiShim.compression.test.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/integrations/models/kimi.test.tssrc/utils/model/routeCatalogOptions.test.tssrc/utils/providerProfiles.test.tssrc/utils/model/modelOptions.gateways.test.tssrc/services/api/client.test.tssrc/utils/effort.codex.test.tssrc/services/api/openaiShim.compression.test.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/providerConfig.test.ts
🔇 Additional comments (19)
src/utils/model/routeCatalogOptions.ts (1)
7-10: LGTM!Also applies to: 51-75
src/utils/model/routeCatalogOptions.test.ts (1)
32-42: LGTM!src/utils/model/modelOptions.gateways.test.ts (1)
108-117: 🩺 Stability & AvailabilityNo env cleanup issue here. Shared
beforeEachclears these env vars andafterEachrestores the originals, so this test remains isolated.> Likely an incorrect or invalid review comment.src/utils/effort.ts (1)
47-49: LGTM!Also applies to: 201-209, 565-565
src/services/api/client.ts (1)
16-20: LGTM!Also applies to: 364-415
src/services/api/openaiShim.ts (2)
49-49: LGTM!Also applies to: 3527-3532, 5066-5078
3799-3843: 🎯 Functional CorrectnessNo K3 test gap here. The K3 catalog variants, shared
k3wire model, and nativemaxreasoning path are already covered insrc/integrations/runtimeMetadata.test.ts,src/services/api/providerConfig.test.ts,src/services/api/openaiShim.compression.test.ts,src/services/api/client.test.ts, andsrc/utils/effort.codex.test.ts.> Likely an incorrect or invalid review comment.src/integrations/gateways/kimi-code.ts (2)
8-8: LGTM!
36-40: 📐 Maintainability & Code QualityConfirm the new K3 options are documented.
This exposes a new default, two context-window variants, and a HighSpeed option. Ensure the integration overview and relevant how-to documentation explain
k3vs.k3-256k, affected providers, and the HighSpeed limitations.As per coding guidelines, update documentation when user-facing behavior changes; as per path instructions, provider changes require checking the integration overview and relevant how-to docs.
Sources: Coding guidelines, Path instructions
src/integrations/models/kimi.ts (1)
32-32: LGTM!src/integrations/vendors/moonshot.ts (1)
37-37: LGTM!src/integrations/runtimeMetadata.test.ts (1)
230-237: LGTM!Also applies to: 269-273, 309-342
src/integrations/models/kimi.test.ts (1)
1-8: LGTM!src/services/api/providerConfig.ts (1)
129-133: LGTM!Also applies to: 298-298, 369-380, 963-972
src/services/api/providerConfig.test.ts (1)
40-74: LGTM!Also applies to: 88-107
src/services/api/client.test.ts (1)
1893-1929: LGTM!Also applies to: 1931-1966
src/services/api/openaiShim.compression.test.ts (1)
299-312: LGTM!src/utils/effort.codex.test.ts (1)
476-476: LGTM!Also applies to: 530-541
src/utils/providerProfiles.test.ts (1)
2304-2304: LGTM!
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/services/api/client.test.ts (1)
1893-1929: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAssert the provider route and outgoing model, not only
reasoning_effort.These tests can pass if K3 is routed through the wrong provider or the request uses the wrong model, because they only inspect
reasoning_effort. Capture the fetch URL and assert the Kimi Code endpoint plus the outgoing model isk3in each provider-override case.Also applies to: 1931-1944, 1946-1981
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/services/api/client.test.ts` around lines 1893 - 1929, Update the providerOverride tests around “providerOverride K3 preserves max reasoning from its model query” and the other listed cases to capture the fetch request URL and assert it targets the Kimi Code endpoint. Also assert the parsed request body’s outgoing model is “k3” while retaining the existing reasoning_effort assertions, ensuring each provider-override case validates routing and model translation.Sources: Coding guidelines, Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/integrations/vendors/moonshot.ts`:
- Line 37: Update the relevant Moonshot documentation under docs/integrations/
to document the Kimi K3 model, including its 1,048,576-token context window,
32,768-token maximum output, supported capabilities, and max-only reasoning
limitation using reasoning_effort.
---
Outside diff comments:
In `@src/services/api/client.test.ts`:
- Around line 1893-1929: Update the providerOverride tests around
“providerOverride K3 preserves max reasoning from its model query” and the other
listed cases to capture the fetch request URL and assert it targets the Kimi
Code endpoint. Also assert the parsed request body’s outgoing model is “k3”
while retaining the existing reasoning_effort assertions, ensuring each
provider-override case validates routing and model translation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: a467b04f-fb85-426c-b018-dafff36e2033
📒 Files selected for processing (5)
src/integrations/index.test.tssrc/integrations/runtimeMetadata.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/utils/effort.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: smoke-and-tests (24.11.x)
- GitHub Check: typecheck
- GitHub Check: smoke-and-tests (22)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
TypeScript code in this repository must use strict mode and ESM imports.
**/*.{ts,tsx}: When changing provider behavior, avoid breaking third-party providers and test the exact provider/model path changed when possible.
Runbun run typecheckandbun run typecheck:type-testsfor TypeScript changes.
Run provider tests and provider recommendation tests when changing provider behavior:bun run test:providerandbun run test:provider-recommendation.
Files:
src/integrations/index.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/integrations/runtimeMetadata.test.tssrc/utils/effort.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: Keep changes focused on one problem or feature and avoid mixing unrelated cleanup into the same change.
Preserve existing repository patterns unless intentionally refactoring them.
Update documentation when setup, commands, or user-facing behavior changes.
Review AI-generated changes for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting them.
Follow the existing code style in touched files.
Prefer small, readable changes over broad rewrites.
Do not reformat unrelated files.
Keep comments useful and concise.
Provider changes must explicitly identify affected providers, limitations, and follow-up work in the pull request description.
Do not assign or use provider tags; provider tags are controlled by maintainers.
Run the relevant validation checks locally before submitting changes; pull requests must pass CI checks.
Runbun run security:pr-scanbefore submitting a pull request.
Dependency changes require a concrete project benefit, such as fixing a bug, addressing a security issue, or supporting an approved feature.
Do not change the project's language, core runtime, or dependency stack without prior maintainer agreement.
Files:
src/integrations/index.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/integrations/runtimeMetadata.test.tssrc/utils/effort.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/index.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/integrations/runtimeMetadata.test.tssrc/utils/effort.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Add or update tests when a code change affects behavior.
Files:
src/integrations/index.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/integrations/runtimeMetadata.test.tssrc/utils/effort.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/index.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/integrations/runtimeMetadata.test.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/integrations/index.test.tssrc/services/api/client.test.tssrc/integrations/runtimeMetadata.test.ts
🔇 Additional comments (3)
src/integrations/runtimeMetadata.test.ts (1)
230-237: LGTM!Also applies to: 270-270, 309-342
src/integrations/index.test.ts (1)
99-105: LGTM!src/utils/effort.ts (1)
47-49: LGTM!Also applies to: 201-209, 565-565, 947-954
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/services/api/client.test.ts`:
- Around line 1935-1952: Add a direct-Moonshot outbound regression test beside
the existing Kimi Code providerOverride tests, using baseURL
https://api.moonshot.ai/v1 and model kimi-k3. Exercise the client creation and
beta.messages.create flow, then assert the captured request body contains model
kimi-k3 and reasoning_effort max, while preserving the existing fetch cleanup
pattern.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: bdf21f9c-4dd6-479f-ad3e-97bc3e91b780
📒 Files selected for processing (9)
docs/integrations/overview.mdsrc/services/api/client.test.tssrc/services/api/compressToolHistory.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.test.tssrc/services/api/providerConfig.tssrc/services/compact/autoCompact.test.tssrc/services/compact/autoCompact.tssrc/utils/context.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: smoke-and-tests (22)
- GitHub Check: smoke-and-tests (24.11.x)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
TypeScript code in this repository must use strict mode and ESM imports.
**/*.{ts,tsx}: When changing provider behavior, avoid breaking third-party providers and test the exact provider/model path changed when possible.
Runbun run typecheckandbun run typecheck:type-testsfor TypeScript changes.
Run provider tests and provider recommendation tests when changing provider behavior:bun run test:providerandbun run test:provider-recommendation.
Files:
src/services/api/compressToolHistory.tssrc/services/compact/autoCompact.tssrc/services/compact/autoCompact.test.tssrc/services/api/client.test.tssrc/utils/context.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: Keep changes focused on one problem or feature and avoid mixing unrelated cleanup into the same change.
Preserve existing repository patterns unless intentionally refactoring them.
Update documentation when setup, commands, or user-facing behavior changes.
Review AI-generated changes for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting them.
Follow the existing code style in touched files.
Prefer small, readable changes over broad rewrites.
Do not reformat unrelated files.
Keep comments useful and concise.
Provider changes must explicitly identify affected providers, limitations, and follow-up work in the pull request description.
Do not assign or use provider tags; provider tags are controlled by maintainers.
Run the relevant validation checks locally before submitting changes; pull requests must pass CI checks.
Runbun run security:pr-scanbefore submitting a pull request.
Dependency changes require a concrete project benefit, such as fixing a bug, addressing a security issue, or supporting an approved feature.
Do not change the project's language, core runtime, or dependency stack without prior maintainer agreement.
Files:
src/services/api/compressToolHistory.tsdocs/integrations/overview.mdsrc/services/compact/autoCompact.tssrc/services/compact/autoCompact.test.tssrc/services/api/client.test.tssrc/utils/context.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/services/api/compressToolHistory.tsdocs/integrations/overview.mdsrc/services/compact/autoCompact.tssrc/services/compact/autoCompact.test.tssrc/services/api/client.test.tssrc/utils/context.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Add or update tests when a code change affects behavior.
Files:
src/services/api/compressToolHistory.tssrc/services/compact/autoCompact.tssrc/services/compact/autoCompact.test.tssrc/services/api/client.test.tssrc/utils/context.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/services/api/compressToolHistory.tssrc/services/api/client.test.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.ts
docs/integrations/**/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Provider changes must follow the documented integration patterns, beginning with
docs/integrations/overview.mdand the focused guides underdocs/integrations/how-to/.
Files:
docs/integrations/overview.md
{README.md,CONTRIBUTING.md,docs/**,.github/pull_request_template.md}
⚙️ CodeRabbit configuration file
{README.md,CONTRIBUTING.md,docs/**,.github/pull_request_template.md}: Review docs for accuracy against current code behavior. Flag security or provider claims that overpromise, stale install commands, missing setup caveats, and instructions that could push users toward unsafe credential handling. Keep purely wording-level suggestions non-blocking.
Files:
docs/integrations/overview.md
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/services/compact/autoCompact.test.tssrc/services/api/client.test.tssrc/services/api/providerConfig.test.ts
🔇 Additional comments (11)
src/services/api/providerConfig.ts (1)
285-285: LGTM!src/services/api/openaiShim.ts (2)
3527-3532: LGTM!
3799-3858: LGTM!src/services/compact/autoCompact.ts (1)
35-52: LGTM!src/utils/context.ts (1)
223-268: LGTM!src/services/api/compressToolHistory.ts (1)
217-236: LGTM!src/services/compact/autoCompact.test.ts (2)
26-146: LGTM!
269-301: LGTM!src/services/api/providerConfig.test.ts (1)
51-138: LGTM!src/services/api/client.test.ts (1)
1954-1989: LGTM!docs/integrations/overview.md (1)
137-140: 📐 Maintainability & Code QualityQualify the HighSpeed entitlement claim.
“Six times the speed and three times the quota” is a provider/plan claim. Cite the authoritative provider terms and its tier/region constraints, or soften it to avoid promising an entitlement that may not apply to every eligible subscription.
Sources: Coding guidelines, Path instructions
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/services/api/client.test.ts (1)
2109-2142: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winCover direct-Moonshot disabled thinking.
This only tests
kimi-k3?reasoning=low; addkimi-k3?thinking=disabledand assertthinking: { type: 'disabled' }with noreasoning_effort. The new Moonshot-specific branch could otherwise regress independently of Kimi Code.As per coding guidelines, “Add or update tests when a code change affects behavior” and provider changes should “test the exact provider/model path changed when possible”; as per path instructions, “Block when risky runtime changes lack focused regression coverage.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/services/api/client.test.ts` around lines 2109 - 2142, Extend the direct-Moonshot coverage in the providerOverride tests around getAnthropicClient to use model `kimi-k3?thinking=disabled`, then assert the request body contains thinking with type `disabled` and does not contain reasoning_effort. Keep the existing reasoning=low case intact so both Moonshot query paths are covered independently.Sources: Coding guidelines, Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/services/api/client.test.ts`:
- Around line 2109-2142: Extend the direct-Moonshot coverage in the
providerOverride tests around getAnthropicClient to use model
`kimi-k3?thinking=disabled`, then assert the request body contains thinking with
type `disabled` and does not contain reasoning_effort. Keep the existing
reasoning=low case intact so both Moonshot query paths are covered
independently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8860163a-1097-407f-883e-f1f21e21b76f
📒 Files selected for processing (11)
docs/integrations/overview.mdsrc/integrations/gateways/kimi-code.tssrc/integrations/runtimeMetadata.test.tssrc/integrations/vendors/moonshot.tssrc/services/api/client.test.tssrc/services/api/client.tssrc/services/api/openaiShim.tssrc/services/api/providerConfig.test.tssrc/services/api/providerConfig.tssrc/utils/effort.codex.test.tssrc/utils/effort.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: typecheck
- GitHub Check: smoke-and-tests (22)
- GitHub Check: smoke-and-tests (24.11.x)
🧰 Additional context used
📓 Path-based instructions (7)
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: Keep changes focused on one problem or feature and avoid mixing unrelated cleanup into the same change.
Preserve existing repository patterns unless intentionally refactoring them.
Update documentation when setup, commands, or user-facing behavior changes.
Review AI-generated changes for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting them.
Follow the existing code style in touched files.
Prefer small, readable changes over broad rewrites.
Do not reformat unrelated files.
Keep comments useful and concise.
Provider changes must explicitly identify affected providers, limitations, and follow-up work in the pull request description.
Do not assign or use provider tags; provider tags are controlled by maintainers.
Run the relevant validation checks locally before submitting changes; pull requests must pass CI checks.
Runbun run security:pr-scanbefore submitting a pull request.
Dependency changes require a concrete project benefit, such as fixing a bug, addressing a security issue, or supporting an approved feature.
Do not change the project's language, core runtime, or dependency stack without prior maintainer agreement.
Files:
docs/integrations/overview.mdsrc/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/utils/effort.codex.test.tssrc/utils/effort.tssrc/services/api/openaiShim.tssrc/services/api/client.test.tssrc/services/api/providerConfig.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
docs/integrations/overview.mdsrc/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/utils/effort.codex.test.tssrc/utils/effort.tssrc/services/api/openaiShim.tssrc/services/api/client.test.tssrc/services/api/providerConfig.ts
docs/integrations/**/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Provider changes must follow the documented integration patterns, beginning with
docs/integrations/overview.mdand the focused guides underdocs/integrations/how-to/.
Files:
docs/integrations/overview.md
{README.md,CONTRIBUTING.md,docs/**,.github/pull_request_template.md}
⚙️ CodeRabbit configuration file
{README.md,CONTRIBUTING.md,docs/**,.github/pull_request_template.md}: Review docs for accuracy against current code behavior. Flag security or provider claims that overpromise, stale install commands, missing setup caveats, and instructions that could push users toward unsafe credential handling. Keep purely wording-level suggestions non-blocking.
Files:
docs/integrations/overview.md
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
TypeScript code in this repository must use strict mode and ESM imports.
**/*.{ts,tsx}: When changing provider behavior, avoid breaking third-party providers and test the exact provider/model path changed when possible.
Runbun run typecheckandbun run typecheck:type-testsfor TypeScript changes.
Run provider tests and provider recommendation tests when changing provider behavior:bun run test:providerandbun run test:provider-recommendation.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/utils/effort.codex.test.tssrc/utils/effort.tssrc/services/api/openaiShim.tssrc/services/api/client.test.tssrc/services/api/providerConfig.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Add or update tests when a code change affects behavior.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/utils/effort.codex.test.tssrc/utils/effort.tssrc/services/api/openaiShim.tssrc/services/api/client.test.tssrc/services/api/providerConfig.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/vendors/moonshot.tssrc/integrations/gateways/kimi-code.tssrc/integrations/runtimeMetadata.test.tssrc/services/api/client.tssrc/services/api/providerConfig.test.tssrc/services/api/openaiShim.tssrc/services/api/client.test.tssrc/services/api/providerConfig.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/integrations/runtimeMetadata.test.tssrc/services/api/providerConfig.test.tssrc/utils/effort.codex.test.tssrc/services/api/client.test.ts
🔇 Additional comments (10)
src/integrations/gateways/kimi-code.ts (1)
8-10: LGTM!Also applies to: 38-42
src/integrations/vendors/moonshot.ts (1)
37-37: LGTM!src/integrations/runtimeMetadata.test.ts (1)
230-236: LGTM!Also applies to: 270-270, 325-325
src/services/api/providerConfig.ts (1)
134-136: LGTM!Also applies to: 970-1032
src/utils/effort.ts (1)
47-49: LGTM!Also applies to: 201-209, 565-565, 947-957
src/services/api/client.ts (1)
364-423: LGTM!src/services/api/openaiShim.ts (1)
3799-3858: LGTM!Also applies to: 3873-3884
docs/integrations/overview.md (1)
129-142: LGTM!src/services/api/providerConfig.test.ts (1)
40-119: LGTM!src/utils/effort.codex.test.ts (1)
534-540: LGTM!
|
hello bro please rebase to main and fix conflicts |
|
bro please rebase to main branc again |
|
@kevincodex1 please merge |
Summary
Validation
Summary by CodeRabbit