@staticeng/opencode-litellm 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,7 +56,7 @@ The LiteLLM key must have permission to call `GET /model/info` and root `GET /mo
56
56
 
57
57
  ## Overrides
58
58
 
59
- LiteLLM metadata does not expose every OpenCode model field. Version 0.2.0 includes exact built-in contracts for the currently approved GPT-5.4, GPT-5.5, GPT-5.6, GPT-5.3 Codex Spark, DeepSeek V4 Flash, and Qwen3.8 aliases. Use `overrides` to customize those defaults or to add metadata for unknown models.
59
+ LiteLLM metadata does not expose every OpenCode model field. The plugin includes exact built-in contracts for the currently approved GPT-5.4, GPT-5.5, GPT-5.6, DeepSeek V4 Flash, and Qwen3.8 aliases. Use `overrides` to customize those defaults or to add metadata for unknown models.
60
60
 
61
61
  When LiteLLM publishes `model_info.supported_reasoning_efforts`, the plugin maps that list to OpenCode variants automatically for unknown models. Known contracts use exact alias membership and win over absent, incomplete, or conflicting discovery metadata. No substring, suffix, provider namespace, or base-model inference is used.
62
62
 
@@ -97,13 +97,12 @@ The built-in mode matrix is:
97
97
  | GPT-5.4 / GPT-5.4 Mini | `none`, `low`, `medium`, `high`, `xhigh` | `none` |
98
98
  | GPT-5.5 | `none`, `low`, `medium`, `high`, `xhigh` | `medium` |
99
99
  | GPT-5.6 Luna / Sol / Terra | `none`, `low`, `medium`, `high`, `xhigh`, `max` | `medium` |
100
- | GPT-5.3 Codex Spark | `none`, `low`, `medium`, `high`, `xhigh` | `high` |
101
100
  | DeepSeek V4 Flash | `off`, `low`, `high`, `max` | `max` |
102
101
  | Qwen3.8 | `off`, `low`, `medium`, `xhigh` | `xhigh` |
103
102
 
104
103
  DeepSeek `off` sends canonical `none`. Qwen `off` sends only `chat_template_kwargs.enable_thinking=false`, with no reasoning effort. `ultra` is not generated by a built-in contract. For requests without an explicit named variant, the plugin supplies the row's contract default through model options; an explicit variant is merged afterward and wins. Qwen's explicit `off` cleanup removes the default `xhigh` effort before serialization. The `variantDefault` compatibility marker is UI-only and is stripped before requests for exact built-in aliases.
105
104
 
106
- Normal GPT-5.3 Codex aliases are retired and filtered even if stale discovery metadata still reports them. GPT-5.3 Codex Spark is a separate exact contract and remains available whenever discovered. Unlisted aliases such as `defend/gpt-5.5` do not inherit a contract.
105
+ Normal GPT-5.3 Codex and GPT-5.3 Codex Spark aliases are retired and filtered even if stale discovery metadata still reports them. Unlisted aliases such as `defend/gpt-5.5` do not inherit a contract.
107
106
 
108
107
  ## Runtime Behavior
109
108
 
@@ -113,7 +112,7 @@ Normal GPT-5.3 Codex aliases are retired and filtered even if stale discovery me
113
112
  - Keeps namespaced deployment IDs and augments them with exact bare model-group IDs; exact collisions are enriched deterministically.
114
113
  - Skips malformed group rows without a nonblank `model_group` and exposes reasoning capability on legacy and V2 model metadata.
115
114
  - Applies exact built-in model contracts as defaults, then applies explicit model and provider overrides last.
116
- - Filters retired normal GPT-5.3 Codex aliases without redirecting them; discovered Spark aliases remain independent.
115
+ - Filters retired normal and Spark GPT-5.3 Codex aliases without redirecting them.
117
116
  - Warns safely and keeps deployment models when group discovery fails in non-strict mode; strict mode mutates neither config surface on failure.
118
117
  - Does not write `opencode.json`, cache model metadata, or persist generated provider data.
119
118
  - Emits the required `limit.output` as `0` when LiteLLM reports a context/input limit but no output
@@ -56,11 +56,13 @@ export const MODEL_CONTRACTS = Object.freeze([
56
56
  contract("GPT-5.6 Luna", chatGptAliases("gpt-5.6-luna"), GPT_MAX_MODES, "medium"),
57
57
  contract("GPT-5.6 Sol", chatGptAliases("gpt-5.6-sol"), GPT_MAX_MODES, "medium"),
58
58
  contract("GPT-5.6 Terra", chatGptAliases("gpt-5.6-terra"), GPT_MAX_MODES, "medium"),
59
- contract("GPT-5.3 Codex Spark", chatGptAliases("gpt-5.3-codex-spark"), GPT_STANDARD_MODES, "high"),
60
59
  contract("DeepSeek V4 Flash", ["deepseek-v4-flash-fp8-mtp", "deepseek-v4-flash-fp8-mtp-norefusal"], DEEPSEEK_MODES, "max"),
61
60
  contract("Qwen3.8", ["qwen3.8-27b-refusal-dial"], QWEN_MODES, "xhigh"),
62
61
  ]);
63
- export const RETIRED_MODEL_ALIASES = Object.freeze(chatGptAliases("gpt-5.3-codex"));
62
+ export const RETIRED_MODEL_ALIASES = Object.freeze([
63
+ ...chatGptAliases("gpt-5.3-codex"),
64
+ ...chatGptAliases("gpt-5.3-codex-spark"),
65
+ ]);
64
66
  const contractsByAlias = new Map();
65
67
  for (const entry of MODEL_CONTRACTS) {
66
68
  for (const alias of entry.aliases) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staticeng/opencode-litellm",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "OpenCode plugin that discovers LiteLLM models at runtime.",
5
5
  "type": "module",
6
6
  "license": "MIT",