Commit c75c9fb
committed
Fix: variant field causes 'Invalid API parameter' on GLM provider
The variant:high/variant:max fields injected by the installer are
provider-specific. The ZAI/GLM-5.2 provider does not support the
OpenCode variant parameter — every subagent spawn fails with
'Invalid API parameter, please check the documentation.'
Root cause: OpenCode passes the agent's variant field to the provider
as a model option. Providers that don't recognize the variant name
reject the entire API call. The main build agent works because its
model comes from opencode.json (no variant). Only subagents with
variant: in their frontmatter fail.
Fix:
- Stripped variant from all 49 agents in ocg-test and stillcurrent
- Added warning in install.sh when --variant-* flags are provided
- Documented in lib/models.sh that variant is provider-specific
The model field (zai-coding-plan/glm-5.2) is retained on all agents —
only the variant is removed. Users whose provider supports variants
can add them manually to agent frontmatter.1 parent 9e8d16a commit c75c9fb
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
0 commit comments