🚀 [firebase_ai] Public way to set thoughtSignature on request parts
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 67/100
Research direction
Start by reading the public part constructors and Part in the firebase_ai package, then check how ChatSession preserves thoughtSignature and how parsePart is exported. Confirm which proposed public API fits the package conventions and add or update focused tests for setting and round-tripping the signature. Done means callers can preserve it across turns without using test-only constructors.
Written by the indexing model from the issue text.
Description
What feature would you like to see?
A public way to set thoughtSignature on the parts of a request.
Gemini 3 models return a thoughtSignature on response parts, and the API expects it back on those parts in later turns, otherwise multi-turn function calling with thinking fails. ChatSession handles this internally, but code that builds Content itself (for example a framework keeping its own message history) has no supported way to do it in firebase_ai 5.1.0:
Partkeeps the signature in a private_thoughtSignature. It can be read back throughtoJson(), but not set.- The public
TextPart,InlineDataPart,FileDataandFunctionCallconstructors passthoughtSignature: null. - Only the
@visibleForTesting.forTestconstructors accept it, andparsePartisn't exported.
We use the .forTest constructors in the Genkit plugin for Firebase AI Logic (genkit_firebase_ai) to round-trip signatures, which works but relies on test-only API that could change in any release.
Any of these would solve it:
- A
thoughtSignaturenamed parameter on the public part constructors (and ideally a publicthoughtSignaturegetter onPart). - Exporting
parsePart, so a part can be rebuilt from the JSON the API returned.
- Dominant language
- Dart
- Stars
- 9.3k
- Forks
- 4.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 69
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/flutterfire
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
firebase/flutterfire#18918 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
firebase/flutterfire#18908 ·
Maintainers usually reply within 1 day
-
[📚] App Check Windows Support still N/A on ReadmePossibly taken @Adrianogba claimed this 1 day ago. Opengood first issue type: documentation
Difficulty 1/5 Under an hour Newbie friendliness 35/100
firebase/flutterfire#18913 ·
Maintainers usually reply within 1 day
-
[📚] Data Connect Windows Support still N/A on ReadmePossibly taken @Adrianogba claimed this 1 day ago. Opengood first issue type: documentation
Difficulty 1/5 Under an hour Newbie friendliness 35/100
firebase/flutterfire#18911 ·
Maintainers usually reply within 1 day
-
[📚] Realtime Database Windows Support still N/A on ReadmePossibly taken @Adrianogba claimed this 1 day ago. Opengood first issue type: documentation
Difficulty 1/5 Under an hour Newbie friendliness 1/100
firebase/flutterfire#18909 ·
Maintainers usually reply within 1 day
All issues in firebase/flutterfire
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
customerio/customerio-flutter#441 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
carp-dk/flutter-plugins#1312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
newrelic/newrelic-flutter-agent#256 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
jhomlala/betterplayer#1646 ·
Maintainers usually reply within 1 day
-
Feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
amplitude/Amplitude-Flutter#337 · 1 comment ·
Maintainers usually reply within 1 day