Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Fix stream compatibility and vision model exposure#364

Merged
CJackHwang merged 1 commit into
CJackHwang:devfrom
adnxx1wsx:dev
Apr 29, 2026
Merged

Fix stream compatibility and vision model exposure#364
CJackHwang merged 1 commit into
CJackHwang:devfrom
adnxx1wsx:dev

Conversation

@adnxx1wsx

Copy link
Copy Markdown
Contributor

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

📝 补充信息 | Additional Information

@vercel

vercel Bot commented Apr 29, 2026

Copy link
Copy Markdown

@adnxx1wsx is attempting to deploy a commit to the cjack's projects Team on Vercel.

A member of the Team first needs to authorize it.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 241334c658

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

finalText = replaceCitationMarkersWithLinks(finalText, result.CitationLinks)
}
detected := detectAssistantToolCalls(finalText, finalThinking, finalToolDetectionThinking, toolNames)
detected := detectAssistantToolCalls(result.Text, result.Thinking, result.ToolDetectionThinking, toolNames)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve thinking fallback when visible text sanitizes empty

Passing raw upstream text into detectAssistantToolCalls changes fallback semantics: DetectAssistantToolCalls returns immediately whenever strings.TrimSpace(text) != "", so any leaked DSML/XML wrapper present in result.Text (even if cleanVisibleOutput later strips it to an empty visible reply) prevents parsing valid tool calls from thinking. In that case non-stream chat can now emit upstream_empty_output/tool-choice errors instead of returning the tool call. This regression is introduced here because this call used to pass sanitized finalText, which allowed thinking fallback when the visible text was effectively empty.

Useful? React with 👍 / 👎.

@CJackHwang CJackHwang merged commit c8922c7 into CJackHwang:dev Apr 29, 2026
10 of 13 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants