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

feat: enhance DSML tool-call parsing drift tolerance and update API docs#475

Merged
CJackHwang merged 7 commits into
mainfrom
dev
May 10, 2026
Merged

feat: enhance DSML tool-call parsing drift tolerance and update API docs#475
CJackHwang merged 7 commits into
mainfrom
dev

Conversation

@CJackHwang
Copy link
Copy Markdown
Owner

@CJackHwang CJackHwang commented May 10, 2026

Summary

  • Enhance DSML tool-call parsing to tolerate a wider range of drift: fullwidth bang, ideographic comma, CJK angle brackets, PascalCase local-name, trailing attribute separator, etc.
  • Align Go and Node runtime tool-call parsing logic for cross-language consistency.
  • Update API documentation to reflect current DSML format support.
  • Add extensive test coverage (Go + Node) for edge cases.

Changes in this PR (since prior revert)

  • Revert of fullwidth pipe (commit cee8757): restores halfwidth | to reduce model hallucinations.
  • New feature (commit eaeb403):
    • 32 files changed, 879 insertions(+), 102 deletions(-)
    • Adds drift tolerance for various Unicode/control separators.
    • Aligns parsing between Go and Node.
    • Updates API docs (API.en.md, API.md, prompt-compatibility.md).
    • Adds new test files (client_completion_test.go, and updates to many existing tests).

Test plan

  • Existing Go tests pass
  • Existing Node.js tests pass
  • New test coverage added

🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

ds2api-bot and others added 5 commits May 10, 2026 02:05
The "delete current conversation" feature was not working on Vercel
deployment because the stream flow uses a separate lease mechanism.
The session_id created during prepare phase was not preserved for
deletion when the stream ends.

Changes:
- Add SessionID field to streamLease struct to preserve session_id
- Pass session_id to holdStreamLease during prepare
- Modify releaseStreamLease to return auth and session_id
- Call autoDeleteRemoteSession in handleVercelStreamRelease when
  releasing a lease with auto-delete mode enabled

Closes #vercel-auto-delete
…hardening

feat(toolcall): harden confusable candidate spans
PR #460 introduced fullwidth pipe characters (|) in DSML tool call formatting
to improve parsing robustness, but models exposed to these fullwidth pipes in
system prompts exhibit significantly higher rates of tool output hallucinations.
Reverting to halfwidth pipes (|) drastically reduces tokenizer/perplexity-driven
hallucinations while retaining the existing confusable-hardening in the parser.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ds2api Ready Ready Preview, Comment May 10, 2026 8:30am

Copy link
Copy Markdown

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

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: cee8757d14

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/httpapi/openai/shared/leaked_output_sanitize.go Outdated
… API docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CJackHwang CJackHwang changed the title revert: replace fullwidth pipe | with halfwidth | in DSML tool markup feat: enhance DSML tool-call parsing drift tolerance and update API docs May 10, 2026
# Conflicts:
#	internal/httpapi/openai/chat/handler.go
#	internal/httpapi/openai/chat/vercel_prepare_test.go
#	internal/httpapi/openai/chat/vercel_stream.go
@CJackHwang CJackHwang merged commit 22a00dc into main May 10, 2026
14 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.

1 participant