| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
The following comment was made by an LLM, it may be inaccurate: Potential Related PRs Found:
|
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
|
I am keeping this branch up-to date with dev, would be thankful if this can be merged. engineers using Oracle Code Assist could not use opencode with Open AI models with responses API because of this bug. This is since version 1.3.4 |
Sorry, something went wrong.
Im not sure this is accurate |
Sorry, something went wrong.
Ready for your review |
Sorry, something went wrong.
|
Alr thanks, ill double check this logic tmr I just need to make sure failure cases dont infinitely loop from this (its almost 1am here rn so too late for me to merge if im not 100% confident) |
Sorry, something went wrong.
|
@rekram1-node no pressure here, if I can help with tesing this - let me know. |
Sorry, something went wrong.
|
@rekram1-node I have checked with the recent code changes on dev and we are able to reproduce this issue only when any of the MCPs are enabled. With the proposed fix everything works correctly. |
Sorry, something went wrong.
|
Hi @rekram1-node any idea when this will be merged? This is driving people out of OpenCode tool due to this issue. |
Sorry, something went wrong.
|
/review |
Sorry, something went wrong.
The v6 upgrade changed the default unmapped finish reason from "unknown" to "other", but the prompt loop continue sets were not updated to match. This caused premature loop exit after MCP tool calls, before the model produced final assistant text. Fixes anomalyco#20050 Fixes anomalyco#20465
|
This was tested and works? Im just noticing that the only test seems to assert other as a stop reason to stop rather than continue which i would have assumed was not ur intent? |
Sorry, something went wrong.
|
Our provider emits OpenAI Responses-style structural completion events, but not enough SDK-friendly finish classification for opencode’s current parser. OpenAI Responses itself does not require finish_reason; the client must derive a finish classification from the event stream. The change in this PR works because it treats the unmapped completed function-call step as "other" instead of leaving it undefined. |
Sorry, something went wrong.
|
To the OCA users of opencode: |
Sorry, something went wrong.
There was a problem hiding this comment.
chackour bank user
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #20465
Type of change
What does this PR do?
Fixes blank assistant text in TUI when MCP servers are enabled, a regression introduced in v1.3.4 by the AI SDK 5 -> 6 upgrade.
Root cause: The v6 finish-reason adapter changed the default unmapped reason from unknown to other. The prompt loop continue sets in prompt.ts had unknown removed but other was never added as a replacement. This causes the loop to exit after MCP tool calls before the model produces final text. MCP amplifies this because tool-enabled requests hit this code path far more often.
Additional fix: The TUI AssistantMessage component rendered empty space for intermediate assistant messages whose parts were all hidden (completed tools with details off, empty text). Added a reactive visible memo that hides the entire message when no parts would render.
How did you verify your code works?
Checklist