Skip to content

fix(agents): skip tool-call id sanitization for custom-ollama-com - #34176

Closed
0xsline wants to merge 2 commits into
openclaw:mainfrom
0xsline:fix/issue-33438-custom-ollama-tool-id-sanitize
Closed

0xsline wants to merge 2 commits into
openclaw:mainfrom
0xsline:fix/issue-33438-custom-ollama-tool-id-sanitize

Conversation

@0xsline

@0xsline 0xsline commented Mar 4, 2026 •

Copy link
Copy Markdown

Closes #33438

Summary

  • exclude custom-ollama-com from strict OpenAI-compatible turn/tool id sanitization path
  • keep existing behavior for other strict OpenAI-compatible providers
  • add regression assertions in src/agents/transcript-policy.test.ts

Testing

  • corepack pnpm test src/agents/transcript-policy.test.ts
    • Test Files: 1 passed
    • Tests: 9 passed

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Mar 4, 2026
@greptile-apps

greptile-apps Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR correctly fixes a regression where custom-ollama-com was incorrectly subject to strict OpenAI-compatible tool-call ID sanitization. The fix:

  • Adds custom-ollama-com to OPENAI_COMPAT_TURN_MERGE_EXCLUDED_PROVIDERS, excluding it from both Anthropic-style turn-merge validation and OpenAI-compatible tool-call ID sanitization
  • Matches the existing treatment of openrouter and opencode, which are similarly excluded from these strict OpenAI paths
  • Adds regression tests verifying the fix: a new sanitizeToolCallIds: false assertion in the OpenRouter test, and a dedicated test for custom-ollama-com confirming all affected policy flags

The change is small, well-scoped, and thoroughly tested. All 9 tests pass.

Confidence Score: 5/5

  • Safe to merge — logic is correct, regression tests are comprehensive, and the change is minimal and well-scoped.
  • The fix is straightforward: add custom-ollama-com to an existing exclusion set, matching the proven pattern used for openrouter and opencode. The regression tests thoroughly cover the new behavior and all tests pass. No functional issues identified.
  • No files require special attention.

Last reviewed commit: f03f541

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Apr 13, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom openai-completions providers: tool name becomes empty string on multi-turn tool calls due to ID sanitization

1 participant