feat(cli): add bailian and minimax provider compatibility#2268
feat(cli): add bailian and minimax provider compatibility#2268ilovingjny wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
16 issues found across 28 files
Confidence score: 2/5
- High-confidence compatibility issues suggest real runtime breakage risk:
bailian-coding-plan(andqwen3.5-pluswith that provider) appears unsupported in OpenCode acrosssrc/cli/types.ts,src/cli/model-fallback-requirements.ts, andsrc/cli/provider-availability.ts. - There is a concrete regression risk in fallback behavior: removing
opencodefromgpt-5.2fallback entries formomusandoracleinsrc/cli/model-fallback-requirements.tsmay break the expected GPT-first routing. - Test reliability is weakened by contradictory and skipped coverage in
src/shared/model-requirements.test.tsand a skippedgenerateOmoConfigsuite insrc/cli/config-manager.test.ts, which reduces confidence in the fallback/model changes. - Pay close attention to
src/cli/model-fallback-requirements.ts,src/shared/model-requirements.test.ts,src/cli/types.ts,src/cli/provider-availability.ts, andsrc/shared/provider-model-id-transform.ts- provider/model mismatches and skipped/contradictory tests are the main merge risks.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/cli/model-fallback-requirements.ts">
<violation number="1" location="src/cli/model-fallback-requirements.ts:10">
P1: Custom agent: **Opencode Compatibility**
The provider `bailian-coding-plan` is not supported in the upstream opencode repository. Please ensure providers are implemented upstream before using them here to maintain Opencode compatibility.</violation>
<violation number="2" location="src/cli/model-fallback-requirements.ts:23">
P1: Custom agent: **Opencode Compatibility**
The model `qwen3.5-plus` and provider `bailian-coding-plan` are not supported in the upstream opencode repository.</violation>
<violation number="3" location="src/cli/model-fallback-requirements.ts:29">
P1: The `requiresProvider` array for `hephaestus` is missing `minimax` and `kimi-for-coding`, rendering their fallback entries unreachable for single-provider users.</violation>
<violation number="4" location="src/cli/model-fallback-requirements.ts:33">
P1: `opencode` provider should be added back to the `gpt-5.2` fallback entry for the `oracle` agent to maintain the "GPT-first" guarantee</violation>
<violation number="5" location="src/cli/model-fallback-requirements.ts:99">
P1: `opencode` provider should be added back to the `gpt-5.2` fallback entry for the `momus` agent to maintain the "GPT-first" guarantee</violation>
</file>
<file name="src/shared/provider-model-id-transform.ts">
<violation number="1" location="src/shared/provider-model-id-transform.ts:19">
P1: Custom agent: **Opencode Compatibility**
The `opencode-go` provider expects the model ID `minimax-m2.5` in lowercase, not capitalized.</violation>
<violation number="2" location="src/shared/provider-model-id-transform.ts:24">
P2: Inconsistent case-sensitivity checking for minimax-m2.5 model ID between providers. The `minimax`, `bailian-coding-plan`, and `opencode-go` providers use case-insensitive regex matching (`/^minimax-m2\.5$/i`), but the `opencode` provider uses strict lowercase equality (`model === "minimax-m2.5"`). If model names are passed with mixed casing (e.g., "MiniMax-M2.5"), the transformation to "minimax-m2.5-free" will fail for the opencode provider.</violation>
</file>
<file name="src/cli/types.ts">
<violation number="1" location="src/cli/types.ts:12">
P0: Custom agent: **Opencode Compatibility**
The provider `bailian-coding-plan` does not exist in the OpenCode SDK. Please verify the provider ID against OpenCode's supported providers (e.g., `alibaba` / `alibaba-cn` or other valid coding plan variants like `zhipuai-coding-plan`, `zai-coding-plan`, `minimax-coding-plan`, etc.).</violation>
</file>
<file name="src/cli/provider-availability.ts">
<violation number="1" location="src/cli/provider-availability.ts:30">
P1: Custom agent: **Opencode Compatibility**
The `bailian-coding-plan` provider is not supported by OpenCode. A review of the `anomalyco/opencode` source code shows no implementation or references for this provider ID.</violation>
</file>
<file name="src/cli/model-fallback.policy.test.ts">
<violation number="1" location="src/cli/model-fallback.policy.test.ts:32">
P2: Missing test coverage for Hephaestus opencode-go → glm-5 fallback path. The PR explicitly documents 'Hephaestus opencode-go fallback to glm-5' as intentional, and model-fallback-requirements.ts contains a comment '// opencode-go subscribers get glm-5 (intentional: GLM is a better fit for opencode-go than MiniMax in this slot)' with the corresponding fallback entry. However, there is no test verifying this specific fallback path when hasOpencodeGo: true is set (without OpenAI or Bailian). This leaves an important, explicitly documented fallback rule unverified and susceptible to regression.</violation>
</file>
<file name="src/cli/provider-model-id-transform.test.ts">
<violation number="1" location="src/cli/provider-model-id-transform.test.ts:198">
P2: Test for case-insensitive normalization uses already-capitalized input that won't detect broken normalization logic.</violation>
</file>
<file name="src/cli/config-manager.test.ts">
<violation number="1" location="src/cli/config-manager.test.ts:242">
P1: Test suite for `generateOmoConfig` is skipped, leaving the overhauled model fallback logic untested</violation>
</file>
<file name="docs/guide/agent-model-matching.md">
<violation number="1" location="docs/guide/agent-model-matching.md:86">
P2: Documentation contains contradictory fallback chain information for agent models. The Hephaestus table shows `GPT-5.3 Codex → GLM 5 → MiniMax M2.5 → Qwen3.5 Plus` but the implementation code and 'Hephaestus Fallback Note' both indicate `GPT-5.3 Codex → qwen3.5-plus → glm-5 → MiniMax M2.5`. Additionally, Oracle and Momus tables don't list `qwen3.5-plus` but the 'ChatGPT-First Groups' text and implementation code confirm it as the second fallback. The tables need to be updated to match the implementation and the note section for consistency.</violation>
</file>
<file name="src/shared/model-requirements.test.ts">
<violation number="1" location="src/shared/model-requirements.test.ts:9">
P0: Critical test suites erroneously skipped - AGENT_MODEL_REQUIREMENTS and CATEGORY_MODEL_REQUIREMENTS describe blocks changed to `.skip()`</violation>
<violation number="2" location="src/shared/model-requirements.test.ts:195">
P0: Contradictory test added that conflicts with actual implementation - forbids 'glm' models while implementation includes glm-5 in hephaestus</violation>
</file>
<file name="src/shared/model-requirements.policy.test.ts">
<violation number="1" location="src/shared/model-requirements.policy.test.ts:45">
P2: Test validates the wrong agent chain - tests 'oracle' (a ChatGPT-first agent) when the test name claims to test 'general chains'</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| copilot?: BooleanArg | ||
| opencodeZen?: BooleanArg | ||
| opencodeGo?: BooleanArg | ||
| bailianCodingPlan?: BooleanArg |
There was a problem hiding this comment.
P0: Custom agent: Opencode Compatibility
The provider bailian-coding-plan does not exist in the OpenCode SDK. Please verify the provider ID against OpenCode's supported providers (e.g., alibaba / alibaba-cn or other valid coding plan variants like zhipuai-coding-plan, zai-coding-plan, minimax-coding-plan, etc.).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/cli/types.ts, line 12:
<comment>The provider `bailian-coding-plan` does not exist in the OpenCode SDK. Please verify the provider ID against OpenCode's supported providers (e.g., `alibaba` / `alibaba-cn` or other valid coding plan variants like `zhipuai-coding-plan`, `zai-coding-plan`, `minimax-coding-plan`, etc.).</comment>
<file context>
@@ -8,6 +8,9 @@ export interface InstallArgs {
copilot?: BooleanArg
opencodeZen?: BooleanArg
+ opencodeGo?: BooleanArg
+ bailianCodingPlan?: BooleanArg
+ minimax?: BooleanArg
zaiCodingPlan?: BooleanArg
</file context>
| sisyphus: { | ||
| fallbackChain: [ | ||
| { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }, | ||
| { providers: ["opencode-go", "bailian-coding-plan"], model: "kimi-k2.5" }, |
There was a problem hiding this comment.
P1: Custom agent: Opencode Compatibility
The provider bailian-coding-plan is not supported in the upstream opencode repository. Please ensure providers are implemented upstream before using them here to maintain Opencode compatibility.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/cli/model-fallback-requirements.ts, line 10:
<comment>The provider `bailian-coding-plan` is not supported in the upstream opencode repository. Please ensure providers are implemented upstream before using them here to maintain Opencode compatibility.</comment>
<file context>
@@ -1,152 +1,225 @@
sisyphus: {
fallbackChain: [
- { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
+ { providers: ["opencode-go", "bailian-coding-plan"], model: "kimi-k2.5" },
+ { providers: ["opencode-go", "bailian-coding-plan", "opencode", "zai-coding-plan"], model: "glm-5" },
+ { providers: ["opencode-go", "bailian-coding-plan", "minimax", "opencode"], model: "minimax-m2.5" },
</file context>
| fallbackChain: [ | ||
| { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" }, | ||
| { providers: ["openai"], model: "gpt-5.3-codex", variant: "medium" }, | ||
| { providers: ["bailian-coding-plan"], model: "qwen3.5-plus" }, |
There was a problem hiding this comment.
P1: Custom agent: Opencode Compatibility
The model qwen3.5-plus and provider bailian-coding-plan are not supported in the upstream opencode repository.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/cli/model-fallback-requirements.ts, line 23:
<comment>The model `qwen3.5-plus` and provider `bailian-coding-plan` are not supported in the upstream opencode repository.</comment>
<file context>
@@ -1,152 +1,225 @@
fallbackChain: [
- { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
+ { providers: ["openai"], model: "gpt-5.3-codex", variant: "medium" },
+ { providers: ["bailian-coding-plan"], model: "qwen3.5-plus" },
+ // opencode-go subscribers get glm-5 (intentional: GLM is a better fit for opencode-go than MiniMax in this slot)
+ { providers: ["opencode-go"], model: "glm-5" },
</file context>
| } | ||
|
|
||
| if (provider === "opencode") { | ||
| if (model === "minimax-m2.5") { |
There was a problem hiding this comment.
P2: Inconsistent case-sensitivity checking for minimax-m2.5 model ID between providers. The minimax, bailian-coding-plan, and opencode-go providers use case-insensitive regex matching (/^minimax-m2\.5$/i), but the opencode provider uses strict lowercase equality (model === "minimax-m2.5"). If model names are passed with mixed casing (e.g., "MiniMax-M2.5"), the transformation to "minimax-m2.5-free" will fail for the opencode provider.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/shared/provider-model-id-transform.ts, line 24:
<comment>Inconsistent case-sensitivity checking for minimax-m2.5 model ID between providers. The `minimax`, `bailian-coding-plan`, and `opencode-go` providers use case-insensitive regex matching (`/^minimax-m2\.5$/i`), but the `opencode` provider uses strict lowercase equality (`model === "minimax-m2.5"`). If model names are passed with mixed casing (e.g., "MiniMax-M2.5"), the transformation to "minimax-m2.5-free" will fail for the opencode provider.</comment>
<file context>
@@ -1,18 +1,33 @@
+ }
+
+ if (provider === "opencode") {
+ if (model === "minimax-m2.5") {
+ return "minimax-m2.5-free"
+ }
</file context>
|
@cubic-dev-ai All identified issues have been addressed in the latest commit. Here's a summary of changes made (model names kept as-is per project intent): Fixed:
Not changed (by design):
84 tests passing, 0 TypeScript errors. |
SeeYouCowboi
left a comment
There was a problem hiding this comment.
Just custom your own fallback chain in your oh-my-opencode.json. And you have edited Hephaestus fallback chain, which should be no fallback.
|
[sisyphus-bot] PR sweep first-pass triage on
Needs rebase + review. Please rebase onto current Assigning |
|
[sisyphus-bot] Hi ilovingjny. 🙏 Thanks for the provider-matching overhaul with opencode-go. Picking this back up from the 5/16 triage. The PR is large (1391/402 across 28 files) and shows CONFLICTING against current The provider-matching surface is becoming crowded with parallel proposals. Could you rebase against current Once the rebase is clean and the design is clear, I'll loop a maintainer in. |
|
Thanks for the follow-up. I added the requested comparison section to the PR description. High-level intent for the rebase:
I will rebase against current |
6ba0ec8 to
3bd048d
Compare
|
Rebased and force-pushed this PR onto current I narrowed the PR substantially after the package/model-core refactor. Current
Important boundary: MiniMax is not added to Hephaestus, Oracle, Momus, For @chentianxin's question: yes, this is intended to address the case where Validated locally:
I also tried the full @cubic-dev-ai please re-run the review on the new commit. |
@ilovingjny I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 26 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: The PR touches 26 files across installer, config detection, model requirements, and fallback logic, introducing two new provider paths; despite passing tests, the scope and complexity make it impossible to be 100% certain of zero regressions.
Re-trigger cubic
eb25d29 to
2bfad49
Compare



Summary
This PR has been rebased onto current
devand narrowed to the provider compatibility pieces that are still missing in the current architecture.Current
devalready moved model requirements intopackages/model-coreand already covers much of the original provider-matching direction (opencode-go,kimi-for-coding,vercel, and the newer fallback-chain shape). This refreshed PR does not revive the old broad fallback overhaul. It adds the remainingbailian-coding-planand directminimaxcompatibility paths in the current package layout.What changed
--bailian-coding-planand--minimax.bailian-coding-plan/andminimax/model config entries during install/config refresh.bailian-coding-planandminimaxthrough provider availability so fallback-chain resolution can actually select them.bailian-coding-planroutes for Qwen/GLM/Kimi-compatible fallback entries where the current chains already use those model families.minimax/MiniMax-M2.5support only to utility-capable chains:librarian,explore,atlas,sisyphus-junior,quick,unspecified-low, andwriting.minimax-m2.5toMiniMax-M2.5for direct MiniMax-compatible providers (minimax,bailian-coding-plan).Boundaries
This intentionally keeps the risky parts out of scope:
deep, orultrabrain.scribe/writing-agent changes are not part of this PR. That direction belongs to the separate writing-category PR.src/shared/model-requirements.ts-style changes are not restored; the refreshed implementation follows currentpackages/model-coreownership.Comparison with current provider/model work
googleprovider. That is orthogonal to these Bailian/MiniMax fallback entries.Test plan
bun test src/cli/model-fallback.test.tsbun test packages/model-core/src/model-requirements.test.ts packages/model-core/src/provider-model-id-transform.test.ts src/cli/provider-availability.test.ts src/cli/provider-model-id-transform.test.ts src/cli/install-validators.test.tsbun test src/cli/cli-installer.test.ts src/cli/tui-installer.test.ts src/cli/cli-installer.telemetry.test.ts src/cli/config-manager/generate-omo-config.test.ts src/cli/config-manager/write-omo-config.test.ts src/cli/openai-only-model-catalog.test.tsbun run typecheckbun run buildgit diff --check