opencode-gemini-oauth 1.1.0 → 1.1.4
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/index.js +9 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -210,10 +210,17 @@ var GeminiOAuthPlugin = async (input) => {
|
|
|
210
210
|
const { client } = input;
|
|
211
211
|
const authHook = {
|
|
212
212
|
provider: "google",
|
|
213
|
-
loader: async (getAuth) => {
|
|
213
|
+
loader: async (getAuth, provider) => {
|
|
214
214
|
const auth = await getAuth();
|
|
215
215
|
if (!auth || auth.type !== "oauth") {
|
|
216
|
-
return
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
if (provider?.models) {
|
|
219
|
+
for (const model of Object.values(provider.models)) {
|
|
220
|
+
if (model) {
|
|
221
|
+
model.cost = { input: 0, output: 0 };
|
|
222
|
+
}
|
|
223
|
+
}
|
|
217
224
|
}
|
|
218
225
|
return {
|
|
219
226
|
apiKey: "",
|