How can we use the betav1 endpoint of google gemini which has function calling? #2394

Open
opened 2026-02-16 17:35:27 -05:00 by yindo · 5 comments
Owner

Originally created by @helloravi on GitHub (Oct 31, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

https://ai.google.dev/gemini-api/docs/api-versions

Using the function calling lets us run the agents longer.

Originally created by @helloravi on GitHub (Oct 31, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question https://ai.google.dev/gemini-api/docs/api-versions Using the function calling lets us run the agents longer.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3140: GenerateContentRequest.tools[0].function_declarations error - specifically deals with Gemini API function declaration issues
  • #1052: Gemini tool calls format causing AI_APICallError - addresses tool calling format compatibility with Gemini API
  • #1935: handle function call ordering for google models (closed) - previously resolved function calling issues with Google models

Feel free to ignore if none of these address your specific case about the betav1 endpoint.

@github-actions[bot] commented on GitHub (Oct 31, 2025): This issue might be a duplicate of existing issues. Please check: - #3140: GenerateContentRequest.tools[0].function_declarations error - specifically deals with Gemini API function declaration issues - #1052: Gemini tool calls format causing AI_APICallError - addresses tool calling format compatibility with Gemini API - #1935: handle function call ordering for google models (closed) - previously resolved function calling issues with Google models Feel free to ignore if none of these address your specific case about the betav1 endpoint.
Author
Owner

@rekram1-node commented on GitHub (Oct 31, 2025):

@helloravi default is v1beta https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#provider-instance

@rekram1-node commented on GitHub (Oct 31, 2025): @helloravi default is v1beta https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#provider-instance
Author
Owner

@helloravi commented on GitHub (Oct 31, 2025):

I am ignorant please bear with me.

  1. Do we use betav1 end point already? Is there way to see which url is being used by myself?
  2. Do we use ai-sdk.dev in opencode?
@helloravi commented on GitHub (Oct 31, 2025): I am ignorant please bear with me. 1. Do we use betav1 end point already? Is there way to see which url is being used by myself? 2. Do we use ai-sdk.dev in opencode?
Author
Owner

@rekram1-node commented on GitHub (Oct 31, 2025):

I am ignorant please bear with me.

Hey no worries at all :) Totally reasonable questions!

  1. Yes, hm probably not an easy way to see that tbh i dont think we have any fetch logs and if you did it through a proxy youd be overriding default base url, so I guess in google cloud logs
  2. YES, big time
@rekram1-node commented on GitHub (Oct 31, 2025): > I am ignorant please bear with me. Hey no worries at all :) Totally reasonable questions! 1. Yes, hm probably not an easy way to see that tbh i dont think we have any fetch logs and if you did it through a proxy youd be overriding default base url, so I guess in google cloud logs 2. YES, big time
Author
Owner

@helloravi commented on GitHub (Oct 31, 2025):

Thank you so much :)

@helloravi commented on GitHub (Oct 31, 2025): Thank you so much :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2394