CLIProxyAPI icon indicating copy to clipboard operation
CLIProxyAPI copied to clipboard

Anitigravity models are not working in opencode cli, has serveral bugs

Open huynguyen03dev opened this issue 1 year ago • 10 comments

When using model gemini-claude-sonnet-4-5-thinking in opencode.

I got this error first: {"type":"error","error":{"type":"invalid_request_error","message":"tools.0.custom.input_schema: Field required"},"request_id":"req_vrtx_011CVWKcEtX6Wi8JCNk8fDmS"}

After trying to fix that error, I got a new error: {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.1.text.text: Field required"},"request_id":"req_vrtx_011CVWFB6CEKxQyJdeqFshnm"}

I cannot fix this by myself, can someone look into this please. Thank you! I think the actual problem is opencode request format but not really sure about this.

huynguyen03dev avatar Nov 26 '25 10:11 huynguyen03dev

gemini-claude-sonnet-4-5-thinking supports the gemini protocol only.

So, you need to use the gemini protocol in your client.

luispater avatar Nov 26 '25 12:11 luispater

"CLIProxy": {
  "npm": "@ai-sdk/google",
  "name": "AGY (Google)",
  "options": {
    "baseURL": "http://localhost:8317/v1beta",
    "apiKey": "key",
  },
  "models": {
    "gemini-claude-sonnet-4-5-thinking": {
      "name": "Sonnet 4.5 Think (AGY)",
      "limit": {
        "context": 200000,
        "output": 64000
      }
    }
  }
}

},

i have it setup like this but still get this issue:

{"type":"error","error":{"type":"invalid_request_error","message":"tools.10.custom.input_schema: Field required"},"request_id":"req_vrtx_011CVWa79UH8VrHHe5AxR9Zq"}

what am i doing wrong here?

FammasMaz avatar Nov 26 '25 13:11 FammasMaz

{"type":"error","error":{"type":"invalid_request_error","message":"tools.10.custom.input_schema: Field required"},"request_id":"req_vrtx_011CVxcL9kLdYFgquMQv1c9T"}

I have the same issue. I use {"npm": "@ai-sdk/google"} @luispater

burugo avatar Dec 10 '25 07:12 burugo

{"type":"error","error":{"type":"invalid_request_error","message":"tools.10.custom.input_schema: Field required"},"request_id":"req_vrtx_011CVxcL9kLdYFgquMQv1c9T"}

I have the same issue. I use {"npm": "@ai-sdk/google"} @luispater

use @ai-sdk/anthropic, it works

huynguyen03dev avatar Dec 10 '25 09:12 huynguyen03dev

{"type":"error","error":{"type":"invalid_request_error","message":"tools.10.custom.input_schema: Field required"},"request_id":"req_vrtx_011CVxcL9kLdYFgquMQv1c9T"} I have the same issue. I use {"npm": "@ai-sdk/google"} @luispater

use @ai-sdk/anthropic, it works

Thank you so much, that completely solved my problem.

burugo avatar Dec 10 '25 10:12 burugo

anyone have any docs or template for the config on how i can get this to work within opencode? i keep running it issues where it doesn't recognize the provider after i auth with antigravity using the vibeproxy mac app

iamhenry avatar Dec 10 '25 15:12 iamhenry

for anyone that needs the config you can find it here: https://github.com/automazeio/vibeproxy/issues/67#issuecomment-3637841125

iamhenry avatar Dec 10 '25 17:12 iamhenry

i've added some more examples for opencode

georgkreimer avatar Dec 10 '25 19:12 georgkreimer

i've added some more examples for opencode

how did you know to set base url by "v1beta" in google models?

m4rsquake avatar Feb 08 '26 13:02 m4rsquake

i've added some more examples for opencode

how did you know to set base url by "v1beta" in google models?

look at the REST example: https://ai.google.dev/gemini-api/docs#rest

georgkreimer avatar Feb 08 '26 15:02 georgkreimer