Skip to content

feat(provider): Add Kimi K3 support across applicable providers#933

Closed
navedmerchant wants to merge 3 commits into
mainfrom
feat/kimi-k3-support
Closed

feat(provider): Add Kimi K3 support across applicable providers#933
navedmerchant wants to merge 3 commits into
mainfrom
feat/kimi-k3-support

Conversation

@navedmerchant

@navedmerchant navedmerchant commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Related GitHub Issue

Closes #932

Description

Adds Kimi K3 support only where provider-specific model identifiers are confirmed:

  • Adds kimi-k3 to the direct Moonshot and curated OpenCode Go catalogs with provider-advertised context limits, 128K output, multimodal input, automatic prompt caching, required max reasoning, reasoning preservation, and confirmed pricing.
  • Normalizes dynamic moonshotai/kimi-k3 metadata from Vercel AI Gateway; Zoo Gateway inherits the same normalized capabilities.
  • Updates applicable OpenAI-compatible, OpenCode Go, Vercel AI Gateway, and Zoo Gateway request paths to omit temperature, require max reasoning, preserve reasoning_content across tool-call continuations, and avoid explicit cache breakpoints for automatic caching.
  • Extends AI SDK message conversion so retained assistant reasoning is serialized through continuation requests.
  • Adds focused catalog, fetcher, provider, converter, and real-SDK HTTP serialization coverage. The real-SDK Moonshot test is integrated into the tracked moonshot.spec.ts suite.

Intentionally does not add speculative static entries for Fireworks, Baseten, Bedrock, or Vertex because confirmed provider-specific IDs are unavailable. OpenRouter and other dynamic/user-supplied catalogs require no static addition.

Test Procedure

Validation completed for this change set:

  • 186 affected extension tests passed.
  • 16 @roo-code/types tests passed.
  • Final Moonshot suite passed all 23 tests, including real-SDK HTTP serialization.
  • Type checks passed; the pre-push hook completed all 11 workspace type-check targets.
  • Focused ESLint and Prettier checks passed; the commit hook also completed lint across all 11 configured packages.
  • Final diff checks passed.

Reviewers can verify the focused catalog, fetcher, provider, and converter specs modified by this PR and confirm Kimi K3 requests omit temperature, use max reasoning, preserve reasoning through tool calls, and omit explicit cache breakpoints.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Not applicable; this change has no UI impact.

Documentation Updates

  • No documentation updates are required.
  • Yes, documentation updates are required.

Additional Notes

No changeset is included, per repository convention. The commit contains only the Kimi K3 implementation and focused tests.

Get in Touch

GitHub: @navedmerchant

Summary by CodeRabbit

  • New Features
    • Added Kimi K3 model support across Moonshot, OpenCode Go, Vercel AI Gateway, and Zoo Gateway, including updated multimodal/image and prompt-caching capabilities plus pricing/limits.
    • Improved reasoning handling by preserving reasoning content and tool calls in streaming and continuation flows.
  • Bug Fixes
    • Prevented temperature from being sent when a model does not support it.
    • Updated reasoning-effort injection rules for required vs optional models.
    • Adjusted prompt-caching behavior to better match provider-specific cache breakpoint semantics.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Kimi K3 to Moonshot and OpenCode Go catalogs, normalizes gateway metadata, sends required reasoning settings, omits unsupported temperature, and preserves reasoning/tool calls across provider requests.

Changes

Kimi K3 provider support

Layer / File(s) Summary
Model catalogs and metadata
packages/types/src/providers/*, packages/types/src/__tests__/opencode-go.test.ts
Registers Kimi K3 with model limits, multimodal and caching capabilities, reasoning configuration, temperature support, and pricing.
Shared reasoning and message conversion
src/api/providers/openai-compatible.ts, src/api/providers/openai.ts, src/api/providers/moonshot.ts, src/api/transform/*
Adds required reasoning-effort handling, omits unsupported temperature, preserves reasoning alongside tool calls, and disables explicit Moonshot cache breakpoints.
OpenCode Go request flow
src/api/providers/opencode-go.ts, src/api/providers/fetchers/__tests__/opencode-go.spec.ts, src/api/providers/__tests__/opencode-go.spec.ts
Shapes Kimi K3 streaming and completion requests with required max reasoning, maximum output tokens, and no temperature.
Gateway normalization and reasoning flow
src/api/providers/{vercel-ai-gateway,zoo-gateway}.ts, src/api/providers/fetchers/*gateway*, src/api/providers/__tests__/*gateway.spec.ts
Normalizes gateway metadata, conditionally sends reasoning effort, omits unsupported temperature, and emits streamed reasoning chunks.
Direct Moonshot validation
src/api/providers/__tests__/moonshot.spec.ts
Tests Kimi K3 metadata, request parameters, serialized HTTP bodies, and reasoning/tool-call preservation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ProviderHandler
  participant AI SDK
  participant ProviderAPI
  Client->>ProviderHandler: submit Kimi K3 messages
  ProviderHandler->>AI SDK: serialize reasoning and tool calls
  ProviderHandler->>ProviderAPI: send reasoning_effort and token limits without temperature
  ProviderAPI-->>ProviderHandler: stream response deltas
  ProviderHandler-->>Client: emit text, reasoning, and tool results
Loading

Possibly related PRs

Suggested labels: awaiting-review

Suggested reviewers: taltas, hannesrudolph, edelauna

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning An unrelated README indentation-only change appears outside the issue scope and is not covered by the PR description. Remove the README whitespace-only change or mention it explicitly if it is intentionally bundled with this feature.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding Kimi K3 support across providers.
Description check ✅ Passed The description matches the required template and includes the linked issue, implementation summary, tests, checklist, and notes.
Linked Issues check ✅ Passed The changes satisfy the linked issue by adding Kimi K3 support, request shaping, normalization, tests, and by avoiding speculative static entries.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/kimi-k3-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
src/api/providers/vercel-ai-gateway.ts (1)

109-112: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the new streaming-output and non-streaming request paths in both gateways.

The new createMessage request parameters are tested, but reasoning-delta emission and completePrompt serialization remain uncovered.

  • src/api/providers/vercel-ai-gateway.ts#L109-L112: test that reasoning_content and reasoning deltas yield reasoning chunks.
  • src/api/providers/vercel-ai-gateway.ts#L143-L170: test Kimi K3 and optional-reasoning completePrompt payloads.
  • src/api/providers/zoo-gateway.ts#L258-L261: test that reasoning deltas yield reasoning chunks.
  • src/api/providers/zoo-gateway.ts#L305-L332: test Kimi K3 and optional-reasoning completePrompt payloads.

As per coding guidelines, use package-local unit tests for request construction and error handling.

🤖 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/api/providers/vercel-ai-gateway.ts` around lines 109 - 112, Expand
package-local unit tests for src/api/providers/vercel-ai-gateway.ts:109-112 to
verify reasoning_content and reasoning deltas yield reasoning chunks, and for
src/api/providers/vercel-ai-gateway.ts:143-170 to verify Kimi K3 and
optional-reasoning completePrompt payload serialization. Add equivalent coverage
in src/api/providers/zoo-gateway.ts:258-261 and
src/api/providers/zoo-gateway.ts:305-332, covering reasoning-delta emission and
both completePrompt payload variants. Use the existing gateway streaming and
completePrompt test helpers without changing production behavior.

Source: Coding guidelines

src/api/providers/openai-compatible.ts (1)

221-234: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Make temperature resolution consistent with createMessage.

In createMessage, the temperature resolves with model.temperature ?? this.config.temperature ?? 0. Here in completePrompt, model.temperature is bypassed, which could cause it to ignore model-specific temperature overrides (such as those returned by a subclass's getModel implementation).

Consider updating the fallback to match createMessage:

♻️ Proposed fix
 	async completePrompt(prompt: string): Promise<string> {
 		const model = this.getModel()
 		const languageModel = this.getLanguageModel()
 		const reasoningEffort = this.getReasoningEffort(model)
 
 		const { text } = await generateText({
 			model: languageModel,
 			prompt,
 			maxOutputTokens: this.getMaxOutputTokens(),
-			temperature: model.info.supportsTemperature === false ? undefined : (this.config.temperature ?? 0),
+			temperature:
+				model.info.supportsTemperature === false
+					? undefined
+					: (model.temperature ?? this.config.temperature ?? 0),
 			...(reasoningEffort && {
 				providerOptions: { openaiCompatible: { reasoningEffort } },
 			}),
 		})
🤖 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/api/providers/openai-compatible.ts` around lines 221 - 234, Update the
temperature expression in completePrompt to resolve model.temperature before
this.config.temperature and the 0 default, while preserving the existing
supportsTemperature check and undefined behavior for unsupported models. Match
the resolution used by createMessage and use the model returned by getModel.
src/api/providers/opencode-go.ts (1)

506-509: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider aligning streamAnthropicMessage with this temperature logic.

The non-streaming Anthropic path now correctly checks info.supportsTemperature !== false. Consider updating streamAnthropicMessage (around line 288) to use the exact same logic for consistency, in case a future Anthropic-format model explicitly disables temperature.

💡 Proposed consistency update (outside this hunk)
 	private async *streamAnthropicMessage(
         // ...
-			temperature: this.supportsTemperature(modelId) ? (temperature ?? 1.0) : undefined,
+			temperature: info.supportsTemperature !== false && this.supportsTemperature(modelId) ? (temperature ?? 1.0) : undefined,
🤖 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/api/providers/opencode-go.ts` around lines 506 - 509, Update
streamAnthropicMessage to apply the same temperature condition as the
non-streaming Anthropic path: require both info.supportsTemperature !== false
and this.supportsTemperature(modelId) before using the provided temperature or
1.0; otherwise pass undefined.
🤖 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.

Nitpick comments:
In `@src/api/providers/openai-compatible.ts`:
- Around line 221-234: Update the temperature expression in completePrompt to
resolve model.temperature before this.config.temperature and the 0 default,
while preserving the existing supportsTemperature check and undefined behavior
for unsupported models. Match the resolution used by createMessage and use the
model returned by getModel.

In `@src/api/providers/opencode-go.ts`:
- Around line 506-509: Update streamAnthropicMessage to apply the same
temperature condition as the non-streaming Anthropic path: require both
info.supportsTemperature !== false and this.supportsTemperature(modelId) before
using the provided temperature or 1.0; otherwise pass undefined.

In `@src/api/providers/vercel-ai-gateway.ts`:
- Around line 109-112: Expand package-local unit tests for
src/api/providers/vercel-ai-gateway.ts:109-112 to verify reasoning_content and
reasoning deltas yield reasoning chunks, and for
src/api/providers/vercel-ai-gateway.ts:143-170 to verify Kimi K3 and
optional-reasoning completePrompt payload serialization. Add equivalent coverage
in src/api/providers/zoo-gateway.ts:258-261 and
src/api/providers/zoo-gateway.ts:305-332, covering reasoning-delta emission and
both completePrompt payload variants. Use the existing gateway streaming and
completePrompt test helpers without changing production behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c3e3961-676a-498e-badb-b742d77a7207

📥 Commits

Reviewing files that changed from the base of the PR and between 3a4006a and 51d9eb7.

📒 Files selected for processing (16)
  • packages/types/src/__tests__/opencode-go.test.ts
  • packages/types/src/providers/moonshot.ts
  • packages/types/src/providers/opencode-go.ts
  • src/api/providers/__tests__/moonshot.spec.ts
  • src/api/providers/__tests__/opencode-go.spec.ts
  • src/api/providers/__tests__/vercel-ai-gateway.spec.ts
  • src/api/providers/__tests__/zoo-gateway.spec.ts
  • src/api/providers/fetchers/__tests__/opencode-go.spec.ts
  • src/api/providers/fetchers/__tests__/vercel-ai-gateway.spec.ts
  • src/api/providers/fetchers/vercel-ai-gateway.ts
  • src/api/providers/openai-compatible.ts
  • src/api/providers/opencode-go.ts
  • src/api/providers/vercel-ai-gateway.ts
  • src/api/providers/zoo-gateway.ts
  • src/api/transform/__tests__/ai-sdk.spec.ts
  • src/api/transform/ai-sdk.ts

@navedmerchant navedmerchant changed the title Add Kimi K3 support across applicable providers feat(provider): Add Kimi K3 support across applicable providers Jul 18, 2026
@github-actions github-actions Bot added has-conflicts PR has merge conflicts with the base branch awaiting-review PR changes are ready and waiting for maintainer re-review and removed has-conflicts PR has merge conflicts with the base branch awaiting-review PR changes are ready and waiting for maintainer re-review labels Jul 18, 2026
@github-actions github-actions Bot added awaiting-review PR changes are ready and waiting for maintainer re-review has-conflicts PR has merge conflicts with the base branch and removed has-conflicts PR has merge conflicts with the base branch awaiting-review PR changes are ready and waiting for maintainer re-review labels Jul 22, 2026
roomote added 2 commits July 24, 2026 04:49
- Honor requiredReasoningEffort in getOpenAiReasoning so Kimi K3 always
  sends reasoning_effort=max, matching the Roo provider precedent
- Send resolved reasoning params in completePrompt and the non-streaming
  createMessage branch
- Skip explicit cache_control breakpoints for Moonshot (automatic caching)
  via a useExplicitCacheBreakpoints hook
- Rewrite the K3 moonshot specs for the OpenAI SDK handler path and add
  coverage for required-effort resolution and the non-streaming branch
@github-actions github-actions Bot removed the has-conflicts PR has merge conflicts with the base branch label Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (3)
src/api/providers/opencode-go.ts (1)

136-144: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve the normal reasoning fallback when required metadata is incomplete.

If requiredReasoningEffort is true but info.reasoningEffort is absent, this expression discards params.reasoningEffort and sends no reasoning effort. This diverges from getOpenAiReasoning()’s fallback behavior. Use info.reasoningEffort ?? params.reasoningEffort, or enforce and test the metadata invariant.

🤖 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/api/providers/opencode-go.ts` around lines 136 - 144, Update the
reasoningEffort assignment in the provider model return flow to use
info.reasoningEffort only when it is present, otherwise fall back to
params.reasoningEffort even when requiredReasoningEffort is true. Preserve the
existing getOpenAiReasoning() fallback behavior.
src/api/providers/openai.ts (1)

312-323: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Forward per-call timeout/cancellation options to the SDK requests.

CompletePromptOptions defines abortSignal and timeoutMs, but completePrompt only uses them as type-level parameters. Pass them to the SDK call options so callers with stop/cancel behavior can actually abort the request.

  • src/api/controllers/openai.ts#L312-l: pass { signal: options.abortSignal, timeout: options.timeoutMs } through the OpenAI request options, accounting for the Azure path if needed.
  • src/api/controllers/opencode-go.ts#L491-l: pass the same options through both the Anthropic and OpenAI non-streaming completions.
🤖 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/api/providers/openai.ts` around lines 312 - 323, Forward per-call
cancellation and timeout settings in completePrompt by adding
options.abortSignal as the SDK signal and options.timeoutMs as the SDK timeout
for the OpenAI request, including the Azure request path as needed. Apply the
same signal and timeout forwarding to both Anthropic and OpenAI non-streaming
completion calls in opencode-go’s corresponding completion flow.
src/api/providers/moonshot.ts (1)

31-45: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Retain a structural maxTokens for unknown Moonshot models.

getMoonshotModels() assigns a safe fallback for unknown model IDs, but resolveModelInfo() then clears maxTokens in the handler. Since addMaxTokensIfNeeded() only uses modelInfo.maxTokens when modelMaxTokens is absent, dynamically discovered Moonshot models without a user override send no usable max_tokens to an API that requires it. Strip pricing, but keep the handler’s fallback from resolving to undefined.

🤖 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/api/providers/moonshot.ts` around lines 31 - 45, Update
MoonshotProvider.resolveModelInfo so unknown model IDs retain the fallback
maxTokens from moonshotModels[moonshotDefaultModelId] instead of setting it to
undefined. Continue clearing the pricing fields for unknown models, and preserve
the existing known-model behavior.
🤖 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/api/transform/__tests__/reasoning.spec.ts`:
- Around line 550-594: Update the reasoning tests around getOpenAiReasoning so
they exercise the intended branches: in the “default settings” test, override
baseOptions.reasoningEffort with undefined; in the fallback test, configure
requiredWithoutEffort with a supported reasoning effort and provide a
user-selected reasoning effort in the options. Keep the existing assertions and
test intent unchanged.

---

Outside diff comments:
In `@src/api/providers/moonshot.ts`:
- Around line 31-45: Update MoonshotProvider.resolveModelInfo so unknown model
IDs retain the fallback maxTokens from moonshotModels[moonshotDefaultModelId]
instead of setting it to undefined. Continue clearing the pricing fields for
unknown models, and preserve the existing known-model behavior.

In `@src/api/providers/openai.ts`:
- Around line 312-323: Forward per-call cancellation and timeout settings in
completePrompt by adding options.abortSignal as the SDK signal and
options.timeoutMs as the SDK timeout for the OpenAI request, including the Azure
request path as needed. Apply the same signal and timeout forwarding to both
Anthropic and OpenAI non-streaming completion calls in opencode-go’s
corresponding completion flow.

In `@src/api/providers/opencode-go.ts`:
- Around line 136-144: Update the reasoningEffort assignment in the provider
model return flow to use info.reasoningEffort only when it is present, otherwise
fall back to params.reasoningEffort even when requiredReasoningEffort is true.
Preserve the existing getOpenAiReasoning() fallback behavior.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c318ec55-9e6a-4cc4-b2bd-3f6bac2afae2

📥 Commits

Reviewing files that changed from the base of the PR and between 51d9eb7 and 3830e21.

📒 Files selected for processing (11)
  • README.md
  • packages/types/src/providers/moonshot.ts
  • src/api/providers/__tests__/moonshot.spec.ts
  • src/api/providers/moonshot.ts
  • src/api/providers/openai-compatible.ts
  • src/api/providers/openai.ts
  • src/api/providers/opencode-go.ts
  • src/api/providers/vercel-ai-gateway.ts
  • src/api/providers/zoo-gateway.ts
  • src/api/transform/__tests__/reasoning.spec.ts
  • src/api/transform/reasoning.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/types/src/providers/moonshot.ts
  • src/api/providers/tests/moonshot.spec.ts
  • src/api/providers/openai-compatible.ts
  • src/api/providers/vercel-ai-gateway.ts
  • src/api/providers/zoo-gateway.ts

Comment on lines +550 to +594
it("should send the model's required effort even when the user disables reasoning", () => {
const requiredModel: ModelInfo = {
...baseModel,
supportsReasoningEffort: ["max"],
requiredReasoningEffort: true,
reasoningEffort: "max",
}

const options = {
...baseOptions,
model: requiredModel,
reasoningEffort: "disable" as const,
settings: { reasoningEffort: "disable", enableReasoningEffort: false } as ProviderSettings,
}

const result = getOpenAiReasoning(options)

expect(result).toEqual({ reasoning_effort: "max" })
})

it("should send the model's required effort with default settings", () => {
const requiredModel: ModelInfo = {
...baseModel,
supportsReasoningEffort: ["max"],
requiredReasoningEffort: true,
reasoningEffort: "max",
}

const options = { ...baseOptions, model: requiredModel }

const result = getOpenAiReasoning(options)

expect(result).toEqual({ reasoning_effort: "max" })
})

it("should fall back to normal handling when requiredReasoningEffort has no model effort", () => {
const requiredWithoutEffort: ModelInfo = {
...baseModel,
requiredReasoningEffort: true,
}

const result = getOpenAiReasoning({ ...baseOptions, model: requiredWithoutEffort, settings: {} })

expect(result).toBeUndefined()
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the new tests exercise the branches they describe.

The “default settings” case still inherits reasoningEffort: "medium" from baseOptions, so it does not test an unset user selection. The fallback case has no supportsReasoningEffort, causing the normal path to return undefined regardless of fallback logic. Set the first case’s effort to undefined, and give the fallback model a supported effort plus a user-selected effort.

🤖 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/api/transform/__tests__/reasoning.spec.ts` around lines 550 - 594, Update
the reasoning tests around getOpenAiReasoning so they exercise the intended
branches: in the “default settings” test, override baseOptions.reasoningEffort
with undefined; in the fallback test, configure requiredWithoutEffort with a
supported reasoning effort and provide a user-selected reasoning effort in the
options. Keep the existing assertions and test intent unchanged.

@zoomote

zoomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Closing this PR — the scope crept beyond the original intent (it grew to cover the generic OpenAI Compatible provider, Vercel AI Gateway, Zoo Gateway, and AI SDK message conversion on top of the core catalog additions).

Superseded by a new, narrower PR that adds Kimi K3 to just the Moonshot and OpenCode Go providers. The merge-conflict resolution and the K3 correctness fixes from this branch (required reasoning_effort: "max" on the OpenAI SDK path, reasoning params in completePrompt/non-streaming, and skipping explicit cache_control breakpoints for Moonshot's automatic caching) are carried over to the new PR.

@zoomote zoomote Bot closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Kimi K3 support across applicable providers

2 participants