preserve_reasoning treats OPENAI_BASE_URL as a first-party OpenAI destination
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 4.4k
- Fork
- 508
- Merge trung bình
- 8 giờ 10 phút
- Pull request đã merge (30 ngày)
- 231
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker/docker-agent
-
pkg/hooks tests fail with a misleading assertion when jq is not installedCó thể đã có người làm @dwin-gharibi đã nhận 53 ngày trước. Đang mởarea/testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
docker/docker-agent#4052 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`remove_directory` and `create_directory` hide work they already did when a later path failsCó thể đã có người làm @dwin-gharibi đã nhận 71 ngày trước. Đang mởarea/tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
docker/docker-agent#3933 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`edit_file` silently edits the first match when `oldText` occurs more than onceCó thể đã có người làm @dwin-gharibi đã nhận 71 ngày trước. Đang mởarea/tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
docker/docker-agent#3929 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native API: distinguish provider finish_reason from inferred EOF completion (follow-up to #3669)Đang mởarea/api area/providers/openai area/runtime
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
docker/docker-agent#4624 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Flaky test] TestHandleStream_ContextCancellationCó thể đã có người làm @aheritier đã nhận hôm nay. Đang mởarea/testing automated flaky-test status/needs-triage
docker/docker-agent#4617 · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của docker/docker-agent
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 81/100
apache/rocketmq-dashboard#6895 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
jordansmall/spindrift#5466 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
777genius/agent-notifications#490 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
devantler-tech/ksail#7836 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
keyxmakerx/Chronicle#1469 ·
Maintainer thường phản hồi trong vòng 1 ngày