How to select version? #13

Closed
opened 2026-02-13 17:27:38 -06:00 by mirrors · 8 comments
Owner

Originally created by @npow on GitHub (Apr 2, 2024).

Hi, Gemini has versions 1.0 and 1.5. Is there a way to specify the version when initializing GeminiClient? What is the default version used?

Originally created by @npow on GitHub (Apr 2, 2024). Hi, Gemini has versions `1.0` and `1.5`. Is there a way to specify the version when initializing `GeminiClient`? What is the default version used?
mirrors 2026-02-13 17:27:38 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@jollyolliel commented on GitHub (Apr 3, 2024):

Refer to #5. The 1.5 is the Advacted (Refering to #5 )

@jollyolliel commented on GitHub (Apr 3, 2024): Refer to #5. The 1.5 is the Advacted (Refering to #5 )
Author
Owner

@npow commented on GitHub (Apr 3, 2024):

So by default it should be using 1.0? Reason I'm asking is because the limits are different (15 RPM vs 2 RPM for 1.5) but it seems like I'm being throttled way too early if I'm on 1.0

@npow commented on GitHub (Apr 3, 2024): So by default it should be using `1.0`? Reason I'm asking is because the limits are different (15 RPM vs 2 RPM for 1.5) but it seems like I'm being throttled way too early if I'm on 1.0
Author
Owner

@jollyolliel commented on GitHub (Apr 3, 2024):

Since there's no HTTP 1.5 to test against, HTTP 1.0 is likely the default version, especially considering it was built with HTTP 1.0.
To confirm, check the source code against an HTTP 1.5 request. If you're interested in supporting HTTP 1.5 (optional), identifying the differences and adjustments could be valuable to others. You could even submit a pull request with your changes!

@jollyolliel commented on GitHub (Apr 3, 2024): Since there's no HTTP 1.5 to test against, HTTP 1.0 is likely the default version, especially considering it was built with HTTP 1.0. To confirm, check the source code against an HTTP 1.5 request. If you're interested in supporting HTTP 1.5 (optional), identifying the differences and adjustments could be valuable to others. You could even submit a pull request with your changes!
Author
Owner

@npow commented on GitHub (Apr 3, 2024):

I took a quick look, and I do see the model version in the payload. You seem to be using a different endpoint for GenerateContent though. I'm seeing https://alkalimakersuite-pa.clients6.google.com/$rpc/google.internal.alkali.applications.makersuite.v1.MakerSuiteService/GenerateContent from aistudio.google.com

["models/gemini-1.0-pro",[[[[null,"hi"]],"user"]

vs

["models/gemini-1.5-pro-latest",[[[[null,"hi"]]
@npow commented on GitHub (Apr 3, 2024): I took a quick look, and I do see the model version in the payload. You seem to be using a different [endpoint](https://github.com/HanaokaYuzu/Gemini-API/blob/02a92d3a4ac388c75afb2970e61b6a5eeca211c1/src/gemini_webapi/constants.py#L6) for GenerateContent though. I'm seeing `https://alkalimakersuite-pa.clients6.google.com/$rpc/google.internal.alkali.applications.makersuite.v1.MakerSuiteService/GenerateContent ` from `aistudio.google.com` ``` ["models/gemini-1.0-pro",[[[[null,"hi"]],"user"] ``` vs ``` ["models/gemini-1.5-pro-latest",[[[[null,"hi"]] ```
Author
Owner

@jollyolliel commented on GitHub (Apr 4, 2024):

I didn't make this so I don't know but you could try mess around with the code and see if there is a difference. Also I think that acording to the endpoint link it is using the website https://gemini.google.com/app and not aistudio.google.com. Try looking on the https://gemini.google.com/app website and compare the differences there in the payload.

@jollyolliel commented on GitHub (Apr 4, 2024): I didn't make this so I don't know but you could try mess around with the code and see if there is a difference. Also I think that acording to the endpoint link it is using the website https://gemini.google.com/app and not aistudio.google.com. Try looking on the https://gemini.google.com/app website and compare the differences there in the payload.
Author
Owner

@HanaokaYuzu commented on GitHub (Apr 5, 2024):

As @jollyolliel mentioned, this library is backed on Gemini web app instead of Google AI Studio.

As far as I know, there is no option in the web app to let user choose model version (unless you subscribed to Gemini Advanced, which allows you to use 1.0 Ultra model). Since google hasn't announced model version change for Gemini web app, I believe it's still using 1.0 pro, with extra ability to fetch real time information from internet, and has no limit on request frequency.

@HanaokaYuzu commented on GitHub (Apr 5, 2024): As @jollyolliel mentioned, this library is backed on [Gemini web app](https://gemini.google.com/app) instead of [Google AI Studio](https://aistudio.google.com/app). As far as I know, there is no option in the web app to let user choose model version (unless you subscribed to Gemini Advanced, which allows you to use 1.0 Ultra model). Since google hasn't announced model version change for Gemini web app, I believe it's still using 1.0 pro, with extra ability to fetch real time information from internet, and has no limit on request frequency.
Author
Owner

@chrisdlees commented on GitHub (Jun 14, 2024):

@HanaokaYuzu Sorry to bug you, but will being subscribed to Gemini Advanced and using that account's cookie allow you to use the Ultra model with the unofficial API?

Google is giving away 2 months of free trial to Gemini Advanced, if you sign up for a 2-month, 1TB, Google One trial. I've been able to sign up with both my primary Google account and a throwaway account created just prior to signing up for the trial. This is with United States accounts, btw.

@chrisdlees commented on GitHub (Jun 14, 2024): @HanaokaYuzu Sorry to bug you, but will being subscribed to Gemini Advanced and using that account's cookie allow you to use the Ultra model with the unofficial API? Google is giving away 2 months of free trial to Gemini Advanced, if you sign up for a 2-month, 1TB, Google One trial. I've been able to sign up with both my primary Google account and a throwaway account created just prior to signing up for the trial. This is with United States accounts, btw.
Author
Owner

@HanaokaYuzu commented on GitHub (Jun 18, 2024):

@chrisdlees Sorry but I haven't been able to test this package with advanced subscription (for personal reason I'm not going to activate the free trial). Likely this package will not work as expected, but still, I'm not sure.

@HanaokaYuzu commented on GitHub (Jun 18, 2024): @chrisdlees Sorry but I haven't been able to test this package with advanced subscription (for personal reason I'm not going to activate the free trial). Likely this package will not work as expected, but still, I'm not sure.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mirrors/Gemini-API#13
No description provided.