Reflect on Groq gpt-oss-20b sometimes fails: HTTP 400 "Tool choice is none, but model called a tool"

Aperta
#6,832 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
ai

Direzione di ricerca

The retry loop is in engine/providers/openai_compatible_llm.py around the APIStatusError warning; read how tool_choice is set there and how engine/llm_wrapper.py call_with_tools reaches it. Run tests/test_reflect_provider_smoke.py::test_reflect_answers_from_its_search against Groq to reproduce the 400, then compare with the native_call_reply path added in #6520. Done means the reflect turn succeeds or falls back while still recording used_memory_ids.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

core

What happens: on Groq openai/gpt-oss-20b, a reflect tool turn sometimes comes back as HTTP 400 Tool choice is none, but model called a tool, on every retry (10 of 11 attempts in one run). Reflect then falls back to the standalone prompt and answers without citing its memories.

How to see it: the LLM acceptance (groq/openai/gpt-oss-20b) CI job, tests/test_reflect_provider_smoke.py::test_reflect_answers_from_its_search failed with AssertionError: [] (no used_memory_ids) in run 45199522290 on PR #6817, then passed on rerun. Log lines are from openai_compatible_llm.py:1694, scopes reflect_tool_call and reflect.

Why #6520 does not cover it: that fix (native_call_reply) reads a native call out of a reply that arrived. Here Groq rejects the generation server-side, so there is no reply to read.

What should happen: the turn succeeds or falls back without losing its citations. One option: on this 400, resend once with the tools declared and tool_choice naming the function, or treat it as a model that does not follow the schema.

Where: engine/providers/openai_compatible_llm.py (retry loop around the APIStatusError warning), engine/llm_wrapper.py call_with_tools.

Lingua principale
Python
Stelle
45.2k
Fork
5.9k
Merge medio
6h 18m
PR unite (30g)
354

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vectorize-io/hindsight

Tutte le issue di vectorize-io/hindsight

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.