Deprecate Gemini 3.x tuning parameters - #16630
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request deprecates several model tuning parameters (such as temperature, topP, topK, candidateCount, presencePenalty, and frequencyPenalty) across GenerationConfig, GenerationOptions, and LiveGenerationConfig, as they are no longer recommended for Gemini 3.x models. It introduces new public initializers that omit these deprecated parameters. The review feedback suggests adding comprehensive documentation comments to these new initializers and consistently using the self. prefix for property assignments within them.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request deprecates several model tuning parameters (such as temperature, topP, topK, candidateCount, presencePenalty, and frequencyPenalty) across GenerationConfig, LiveGenerationConfig, and GenerationOptions as they are no longer recommended for Gemini 3.x models. It introduces new initializers that exclude these parameters and updates unit tests with deprecation annotations. Feedback is provided to update an outdated doc comment on the new GenerationOptions initializer, which still references token sampling behavior.
|
/gemini summary |
Summary of ChangesThis pull request updates the FirebaseAI library to align with Gemini 3.x model recommendations by deprecating several tuning parameters that are no longer supported. It introduces new, cleaner initializers for configuration types to facilitate a smoother transition for developers while maintaining backward compatibility through deprecation warnings. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Activity
|
83f8702 to
ad87588
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request deprecates several model tuning parameters (temperature, topP, topK, candidateCount, presencePenalty, and frequencyPenalty) in GenerationConfig and LiveGenerationConfig as they are unsupported in Gemini 3.x and later models. It introduces new initializers without these parameters and updates unit tests and snippets accordingly. Feedback highlights a test failure in GenerativeModelSessionTests.swift due to the removal of temperature from a config where the mock handler still asserts its presence. Additionally, it is recommended to retain or add dedicated test coverage for the serialization and merging of these deprecated parameters to ensure backward compatibility remains verified.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request deprecates several model tuning parameters (temperature, topP, topK, candidateCount, presencePenalty, and frequencyPenalty) in GenerationConfig and LiveGenerationConfig as they are unsupported in Gemini 3.x and later models. New initializers without these parameters have been introduced, and existing tests and snippets have been updated to remove them. The review feedback suggests maintaining test coverage for the encoding and merging behaviors of these deprecated parameters since they are still supported for backward compatibility.
Deprecates
temperature,topP,topK,candidateCount,presencePenalty, andfrequencyPenaltyinFirebaseAIas they are no longer recommended for Gemini 3.x models. Addressing internal b/514770518.Summary of Changes
This pull request updates the FirebaseAI library to align with Gemini 3.x model recommendations by deprecating several tuning parameters that are no longer supported. It introduces new, cleaner initializers for configuration types to facilitate a smoother transition for developers while maintaining backward compatibility through deprecation warnings.
Highlights
temperature,topP,topK,candidateCount,presencePenalty, andfrequencyPenaltyinGenerationConfigandLiveGenerationConfigas they are no longer recommended for Gemini 3.x models.GenerationConfigandLiveGenerationConfigthat exclude the deprecated tuning parameters.GenerationOptionsto deprecate manual sampling and temperature settings, providing alternative initializers.