Conversation
Owner
|
Thanks for the contribution, @samaluk. We are closing this PR because it bundles multiple unrelated features, architectural changes, and bug fixes into a single large diff. We prefer smaller, focused PRs so each change can be reviewed and tested on its own. Here is a breakdown of what is acceptable versus what is not: Acceptable (We welcome a targeted PR for these)
Not Acceptable
If you would like to open a separate, clean PR containing just the protocol and streaming fixes listed above, we will be happy to review and merge it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A single OpenCode Go connection should work across harnesses, but DeepSeek tool continuations fail when required reasoning data is dropped, and other valid requests lose meaning when translated: easy Responses messages are rejected, explicit Claude effort can be lost, and function-tool namespaces cannot round-trip through flat tool APIs. Synthesized Responses streams can omit completed output items, and operators with verified local model definitions cannot use them for discovery.
Normalize supported message forms, preserve explicit effort and tool identity across translation, and emit output-item completion before response completion. Add a file catalog using the existing parser, size limit and stale-data policy. Historical tool calls remain replayable when their definitions are removed; forced choices still require a current definition. Explicit auto/none efforts follow the existing Responses wire policy. Unsupported tool forms and ambiguous mappings still fail explicitly.
Preserve Chat Completions reasoning through streamed and non-streamed Responses turns, associating it with the assistant message and tool calls when replayed. Use an empty compatibility field for older DeepSeek assistant turns whose reasoning is unavailable; foreign summaries and encrypted reasoning are not treated as full upstream reasoning.
Validation: Go tests, review regressions for effort normalization and historical tool replay, vet and native shared-library build; synthetic protocol and tool round-trip tests with Claude Code, OpenCode and Pi; a live Responses reply. Upstream v0.1.7’s quota-usage endpoint fix is retained.
The DeepSeek regression was verified with a live reasoning/tool/result round-trip and an isolated Codex process executing a harmless command and finishing successfully. The new unit tests cover stream/non-stream parity, replay, old histories and reasoning boundaries between turns.