mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
fix(gemini-web): Ignore tool messages to fix sticky selection
This commit is contained in:
@@ -35,6 +35,14 @@ func extractOpenAIStyle(raw []byte) []Message {
|
|||||||
if role == "system" {
|
if role == "system" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
// Ignore OpenAI tool messages to keep hashing aligned with
|
||||||
|
// persistence (which only keeps text/inlineData for Gemini contents).
|
||||||
|
// This avoids mismatches when a tool response is present: the
|
||||||
|
// storage path drops tool payloads while the lookup path would
|
||||||
|
// otherwise include them, causing sticky selection to fail.
|
||||||
|
if role == "tool" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
var contentBuilder strings.Builder
|
var contentBuilder strings.Builder
|
||||||
content := entry.Get("content")
|
content := entry.Get("content")
|
||||||
if !content.Exists() {
|
if !content.Exists() {
|
||||||
|
|||||||
Reference in New Issue
Block a user