opencode-gemini-oauth 1.1.1 → 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.
Files changed (2) hide show
  1. package/dist/index.js +9 -2
  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: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gemini-oauth",
3
- "version": "1.1.1",
3
+ "version": "1.1.4",
4
4
  "description": "OpenCode plugin for Google Gemini OAuth authentication (Antigravity)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",