Skip to content

[AI] Remove unused decoder constant#16047

Merged
paulb777 merged 3 commits intomainfrom
pb-inconsistent-decoding
Apr 8, 2026
Merged

[AI] Remove unused decoder constant#16047
paulb777 merged 3 commits intomainfrom
pb-inconsistent-decoding

Conversation

@paulb777
Copy link
Copy Markdown
Member

@paulb777 paulb777 commented Apr 6, 2026

Remove dead code

#no-changelog

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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.

@paulb777
Copy link
Copy Markdown
Member Author

paulb777 commented Apr 6, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the snake_case key decoding strategy from the generative AI service and adds integration tests to verify the decoding of usage metadata in both streaming and non-streaming responses. A review comment points out that the decoder variable in GenerativeAIService.swift is now unused and should be removed to clean up the code.

Comment thread FirebaseAI/Sources/GenerativeAIService.swift Outdated
@paulb777
Copy link
Copy Markdown
Member Author

paulb777 commented Apr 6, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the snake_case conversion strategy from the JSON decoder in GenerativeAIService and introduces new integration tests to verify the correct decoding of usage metadata for both streaming and non-streaming responses. The review feedback suggests enhancing the new integration tests by adding descriptive failure messages to the #require macro to improve diagnostic clarity in CI environments.

Comment thread FirebaseAI/Tests/TestApp/Tests/Integration/JSONDecodingIntegrationTests.swift Outdated
@paulb777 paulb777 requested a review from andrewheard April 6, 2026 17:45
Comment thread FirebaseAI/Tests/TestApp/Tests/Integration/JSONDecodingIntegrationTests.swift Outdated
Comment thread FirebaseAI/Tests/TestApp/Tests/Integration/JSONDecodingIntegrationTests.swift Outdated
@paulb777 paulb777 changed the title [AI] Streaming decoding consistency [AI] Remove unused decoder constant Apr 8, 2026
@paulb777 paulb777 requested a review from andrewheard April 8, 2026 19:12
@paulb777 paulb777 merged commit 21d1adb into main Apr 8, 2026
85 of 87 checks passed
@paulb777 paulb777 deleted the pb-inconsistent-decoding branch April 8, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants