preserve_reasoning treats OPENAI_BASE_URL as a first-party OpenAI destination
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
- 55/100
Direzione di ricerca
Start in pkg/model/provider/openai: compare Client.firstPartyOpenAIDestination, which reads the ModelConfig.BaseURL field, with Client.effectiveBaseURL, which the issue says reasoning replay already uses. Check how preservesResponseState and shouldMergeConsecutiveMessages consume the result. Done means that OPENAI_BASE_URL pointing at a non-OpenAI host disables reasoning replay, and a test covers that case. Confirm the intended behavior with maintainers before changing shouldMergeConsecutiveMessages.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
pkg/model/provider/openai decides whether a destination is first-party OpenAI in Client.firstPartyOpenAIDestination, which reads ModelConfig.BaseURL. openai.NewClient resolves the effective endpoint differently — base_url, then OPENAI_BASE_URL, then https://api.openai.com/v1 — and stores that result on the embedded config (base.Config.BaseURL). The OpenAI Go SDK also honours OPENAI_BASE_URL on its own.
A model config that names no base_url but points the environment at a local server is therefore classified as first-party OpenAI.
Expected Behavior
provider_opts.preserve_reasoning should not replay encrypted OpenAI reasoning items to an endpoint that is not OpenAI. The first-party determination should consider the endpoint requests actually go to, the way reasoning replay now does in #4485 (Client.effectiveBaseURL).
Actual Behavior
With provider: openai, no base_url, and OPENAI_BASE_URL=http://localhost:8080/v1:
firstPartyOpenAIDestination()returns true, sopreservesResponseState()is on and reasoning items captured from OpenAI are replayed to the local server.shouldMergeConsecutiveMessageshas the same blind spot — it also reads the config field — though that one only affects consecutive-message merging.
Reaching it takes an explicit preserve_reasoning: true, so the blast radius is narrow, but the effect is the opposite of what firstPartyResponses' own comment intends ("Opaque state must not leak to a different vendor's compatible endpoint").
Steps to Reproduce
- Configure
provider: openaiwithprovider_opts: {preserve_reasoning: true}and nobase_url. - Export
OPENAI_BASE_URL=http://localhost:8080/v1against llama.cpp or vLLM. - Run a turn that captures reasoning items, then inspect the next request body.
Additional context
Found while fixing #4363 in #4485. That PR deliberately leaves this path alone: it predates the PR, belongs to the Responses mechanism rather than Chat Completions, and changing it there would widen a review that is already about a different default. Happy to follow up with a PR.
- Lingua principale
- Go
- Stelle
- 4.4k
- Fork
- 508
- Merge medio
- 7h 52m
- PR unite (30g)
- 237
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di docker/docker-agent
-
pkg/hooks tests fail with a misleading assertion when jq is not installedForse già presa @dwin-gharibi l’ha presa 53 giorni fa. Apertaarea/testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
docker/docker-agent#4052 ·
I maintainer di solito rispondono entro 1 giorno
-
`remove_directory` and `create_directory` hide work they already did when a later path failsForse già presa @dwin-gharibi l’ha presa 71 giorni fa. Apertaarea/tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
docker/docker-agent#3933 ·
I maintainer di solito rispondono entro 1 giorno
-
`edit_file` silently edits the first match when `oldText` occurs more than onceForse già presa @dwin-gharibi l’ha presa 71 giorni fa. Apertaarea/tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
docker/docker-agent#3929 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area/docs
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 25/100
docker/docker-agent#4607 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docs area/models area/providers/gemini area/runtime automated
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
docker/docker-agent#4600 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di docker/docker-agent
Issue simili
-
bug frontend grammar sev-3
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
-
connector docs good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
soma-intelligence/open-health-sync#134 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
oss/0 pending team/container-integrations
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DataDog/datadog-agent#58323 ·
I maintainer di solito rispondono entro 1 giorno