This repository was archived by the owner on Jun 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
fix(wp-n9): generate full agent-tier opencode.json from provider choice #58
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ecf671c
fix(wp-n9): generate full agent-tier opencode.json from provider choice
Steffen025 bb04b36
fix(wp-n9): address CodeRabbit findings
Steffen025 0760018
fix(wp-n9): correct zen advanced model ID to claude-3-5-haiku
Steffen025 bd0bc9c
fix(wp-n9): address remaining CodeRabbit findings
Steffen025 ab37834
fix(wp-n9): address CodeRabbit findings round 3
Steffen025 92f14a7
fix(wp-n9): align indentation of symlink block to parent scope
Steffen025 60e4b02
fix(wp-n9): defensive copy legacy alias exports to isolate from PROVI…
Steffen025 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| /** | ||
| * PAI-OpenCode Installer — Provider Model Maps | ||
| * | ||
| * Defines quick/standard/advanced model strings for each supported provider. | ||
| * The installer substitutes these into the opencode.json template at install time. | ||
| * | ||
| * To add a new provider: add an entry below and handle it in steps-fresh.ts. | ||
| */ | ||
|
|
||
| export type ProviderName = "anthropic" | "zen" | "openrouter" | "openai"; | ||
|
|
||
| export interface ModelTierMap { | ||
| quick: string; | ||
| standard: string; | ||
| advanced: string; | ||
| } | ||
|
|
||
| /** | ||
| * Model strings per provider, formatted as "provider/model-name" ready for | ||
| * insertion into opencode.json agent entries. | ||
| */ | ||
| export const PROVIDER_MODELS: Record<ProviderName, ModelTierMap> = { | ||
| anthropic: { | ||
| quick: "anthropic/claude-haiku-4-5", | ||
| standard: "anthropic/claude-sonnet-4-5", | ||
| advanced: "anthropic/claude-opus-4-6", | ||
| }, | ||
| zen: { | ||
| // OpenCode Zen — cost-optimised tiers (IDs verified against opencode.ai/docs/zen/) | ||
| quick: "zen/minimax-m2.5-free", // FREE | ||
| standard: "zen/gpt-5.1-codex-mini", // $0.25/M in+out | ||
| advanced: "zen/claude-3-5-haiku", // $0.80/M — catalog ID for Claude Haiku 3.5 | ||
| }, | ||
| openrouter: { | ||
| quick: "openrouter/google/gemini-flash-1.5", | ||
| standard: "openrouter/anthropic/claude-4.5-sonnet", | ||
| advanced: "openrouter/anthropic/claude-opus-4-6", | ||
| }, | ||
| openai: { | ||
| quick: "openai/gpt-4o-mini", | ||
| standard: "openai/gpt-4o", | ||
| advanced: "openai/gpt-5", | ||
| }, | ||
| }; | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| /** | ||
| * Human-readable labels shown in the installer wizard. | ||
| */ | ||
| export const PROVIDER_LABELS: Record<ProviderName, { label: string; description: string }> = { | ||
| anthropic: { | ||
| label: "Anthropic (Claude)", | ||
| description: "Premium quality — requires Anthropic API key", | ||
| }, | ||
| zen: { | ||
| label: "OpenCode Zen (recommended)", | ||
| description: "Free tier available — 60× cost optimisation vs direct Anthropic", | ||
| }, | ||
| openrouter: { | ||
| label: "OpenRouter", | ||
| description: "Multi-provider flexibility — one API key for many models", | ||
| }, | ||
| openai: { | ||
| label: "OpenAI", | ||
| description: "GPT-4o and GPT-5 — requires OpenAI API key", | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.