@staticeng/opencode-litellm 0.1.5 → 0.1.6
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/dist/mapping.js +6 -1
- package/package.json +1 -1
package/dist/mapping.js
CHANGED
|
@@ -136,6 +136,10 @@ function v2Variants(model) {
|
|
|
136
136
|
const body = raw.options && typeof raw.options === "object" && !Array.isArray(raw.options)
|
|
137
137
|
? raw.options
|
|
138
138
|
: raw;
|
|
139
|
+
if (body.reasoningEffort !== undefined && body.reasoning_effort === undefined) {
|
|
140
|
+
body.reasoning_effort = body.reasoningEffort;
|
|
141
|
+
delete body.reasoningEffort;
|
|
142
|
+
}
|
|
139
143
|
return { id, body };
|
|
140
144
|
});
|
|
141
145
|
}
|
|
@@ -178,10 +182,11 @@ export function buildProvider(models, options = {}) {
|
|
|
178
182
|
id: options.providerKey ?? "LiteLLM",
|
|
179
183
|
name: options.providerName ?? "LiteLLM",
|
|
180
184
|
npm: "@ai-sdk/openai-compatible",
|
|
181
|
-
api:
|
|
185
|
+
api: options.baseURL,
|
|
182
186
|
options: {
|
|
183
187
|
baseURL: options.baseURL,
|
|
184
188
|
apiKey: options.apiKey,
|
|
189
|
+
...(options.apiKey ? { body: { apiKey: options.apiKey } } : {}),
|
|
185
190
|
},
|
|
186
191
|
models: mapModels(models, options),
|
|
187
192
|
}, options.providerOverrides);
|