Skip to content

Comments

fix(core/tool-call): sanitize OpenRouter arguments#355

Closed
zemaj wants to merge 3 commits intojust-every:mainfrom
zemaj:fix/tool-call-json-sanitizer
Closed

fix(core/tool-call): sanitize OpenRouter arguments#355
zemaj wants to merge 3 commits intojust-every:mainfrom
zemaj:fix/tool-call-json-sanitizer

Conversation

@zemaj
Copy link

@zemaj zemaj commented Oct 28, 2025

Summary

  • sanitize streamed tool-call arguments before emitting FunctionCall events so OpenRouter's markdown fences don't break JSON parsing
  • warn when sanitization modifies payload and expose the helper for tests
  • add focused regression tests covering fenced JSON, surrounding prose, arrays, and malformed inputs

Fixes #353

Testing

  • ./build-fast.sh

@zemaj
Copy link
Author

zemaj commented Oct 28, 2025

CI update: Preview Build matrix is nearly done — macOS and Linux x86_64 passed. The remaining jobs still running are: aarch64-unknown-linux-musl and x86_64-pc-windows-msvc (see https://github.com/just-every/code/actions/runs/18864646244). I’ll keep an eye on those; no failures so far.

zemaj added a commit that referenced this pull request Oct 28, 2025
The preview-build workflow was attempting to publish prereleases for all
PRs, including those from forks. Fork PRs don't have write access to
create releases, causing the publish job to fail.

This change adds a condition to only run the release and comment jobs for
PRs originating from the main repository (not forks) by checking:
  github.event.pull_request.head.repo.full_name == github.repository

The build job will still run for all PRs (including forks) to validate
the code, but publishing is now limited to trusted contexts.

Fixes: #355
Fixes: #356

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@zemaj zemaj closed this in #359 Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto Drive failing with OR

1 participant