opencode-plugin-litellm 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/README.md +22 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -89,9 +89,9 @@ If LiteLLM is on `localhost:4000`, `:8000`, or `:8080`, the plugin self-configur
89
89
  }
90
90
  ```
91
91
 
92
- ### Explicit provider
92
+ ### Explicit provider (custom URL or auth)
93
93
 
94
- Override the URL, set an API key, or pre-define curated models that the plugin will preserve:
94
+ You **do not need to list any models** — the plugin still discovers them from `/v1/models` automatically. Use this form only when you need to point at a non-default URL or pass an API key:
95
95
 
96
96
  ```jsonc
97
97
  {
@@ -101,6 +101,25 @@ Override the URL, set an API key, or pre-define curated models that the plugin w
101
101
  "litellm": {
102
102
  "npm": "@ai-sdk/openai-compatible",
103
103
  "name": "LiteLLM (proxy)",
104
+ "options": {
105
+ "baseURL": "http://litellm.internal.example.com/v1",
106
+ "apiKey": "{env:LITELLM_API_KEY}"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ That's the whole config — every model in your LiteLLM `model_list` will appear in the picker.
114
+
115
+ ### Overriding or curating individual models (optional)
116
+
117
+ If you want to rename a model in the picker, pin its `organizationOwner`, or otherwise hand-curate metadata, add it under `models`. The plugin **preserves your entries verbatim** and only injects discovered models whose key isn't already defined:
118
+
119
+ ```jsonc
120
+ {
121
+ "provider": {
122
+ "litellm": {
104
123
  "options": {
105
124
  "baseURL": "http://litellm.internal.example.com/v1",
106
125
  "apiKey": "{env:LITELLM_API_KEY}"
@@ -116,7 +135,7 @@ Override the URL, set an API key, or pre-define curated models that the plugin w
116
135
  }
117
136
  ```
118
137
 
119
- The plugin will **keep your hand-defined `openai/gpt-4o`** and only inject models it discovers that aren't already there.
138
+ Here, `openai/gpt-4o` keeps your custom name; every other model from the proxy is still discovered and added automatically.
120
139
 
121
140
  ### Reasoning models (gpt-5, o1/o3/o4)
122
141
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "opencode-plugin-litellm",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "OpenCode plugin for LiteLLM proxy support with auto-detection and dynamic model discovery",
6
6
  "type": "module",
7
7
  "main": "./src/index.ts",