Bug: ApiException(400) missing thought_signature when using Gemini tools (current_reading_metadata) in v1.14.0[Bug]:
- Linguagem predominante
- Dart
- Estrelas
- 8.8k
- Forks
- 626
- Merge médio
- 9d 22h
- PRs com merge (30d)
- 1
Descrição
### Prerequisites|前提条件
- [x] I have checked the [troubleshooting](https://github.com/Anxcye/anx-reader/blob/develop/docs/troubleshooting.md)|我已经查看过[故障排除](https://github.com/Anxcye/anx-reader/blob/develop/docs/troubleshooting.md)
- [x] I have searched for similar issues and did not find any|我已经搜索过没有相同的问题
### Describe the bug|描述问题
Hello! I'm experiencing an API crash with the new AI integration in v1.14.0 when using Gemini to ask questions about the book (which triggers the `current_reading_metadata` tool).
The Google API now requires a `thought_signature` for function calls to work correctly, which seems to be missing in the app's request.
### To reproduce|重现步骤
1. Open a book in Anx Reader v1.14.0.
2. Open the AI Chat and select a Gemini model (e.g., gemini-3.5-flash).
3. Ask a question that requires reading metadata (like: "cuantas páginas tiene este libro?").
4. See the ApiException(400) error appear immediately instead of the AI's answer.
### Expected behavior|预期行为
The Gemini model should successfully process the `current_reading_metadata` function call and return the requested information about the book, rather than throwing an API Exception.
### Screenshots|截图
### Platform (please complete the following information)|平台(请填写以下信息)
- Platform: Android
- OS: Android 15
- AnxReader Version: 1.14.0
- Device: Tecno Pova 6
### Additional context|其他信息
Full error string shown in UI: "Error: ApiException(400): Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly... Additional data, function call default_api:current_reading_metadata, position 2."
Guia de contribuição
Direção de pesquisa
Reproduce the crash in Anx Reader v1.14.0 on Android by asking the Gemini model a question that invokes current_reading_metadata. Start by tracing the Gemini function-call request and its thought_signature handling. Done means the tool call returns the requested book metadata without the ApiException(400).
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- dart, flutter
- Domínio
- ai, mobile
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Ativa
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 48/100