@staticeng/opencode-litellm 0.2.0 → 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/LICENSE +0 -0
- package/README.md +3 -4
- package/dist/helpers.d.ts +0 -0
- package/dist/helpers.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/litellm.d.ts +0 -0
- package/dist/litellm.js +0 -0
- package/dist/mapping.d.ts +0 -0
- package/dist/mapping.js +0 -0
- package/dist/merge.d.ts +0 -0
- package/dist/merge.js +0 -0
- package/dist/model-contracts.d.ts +0 -0
- package/dist/model-contracts.js +4 -2
- package/dist/options.d.ts +0 -0
- package/dist/options.js +0 -0
- package/dist/types.d.ts +0 -0
- package/dist/types.js +0 -0
- package/package.json +1 -1
package/LICENSE
CHANGED
|
File without changes
|
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.
|
|
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.
|
|
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
|
|
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
|
package/dist/helpers.d.ts
CHANGED
|
File without changes
|
package/dist/helpers.js
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/litellm.d.ts
CHANGED
|
File without changes
|
package/dist/litellm.js
CHANGED
|
File without changes
|
package/dist/mapping.d.ts
CHANGED
|
File without changes
|
package/dist/mapping.js
CHANGED
|
File without changes
|
package/dist/merge.d.ts
CHANGED
|
File without changes
|
package/dist/merge.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/model-contracts.js
CHANGED
|
@@ -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(
|
|
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/dist/options.d.ts
CHANGED
|
File without changes
|
package/dist/options.js
CHANGED
|
File without changes
|
package/dist/types.d.ts
CHANGED
|
File without changes
|
package/dist/types.js
CHANGED
|
File without changes
|