Skip to content

Render structured tool-call arguments in append-only observer - #928

Merged
bradhilton merged 3 commits into
mainfrom
hayek/art-append-tool-args-20260919
Sep 19, 2026
Merged

bradhilton merged 3 commits into
mainfrom
hayek/art-append-tool-args-20260919

Conversation

@bradhilton

@bradhilton bradhilton commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Production Qwen tool-call rollouts can return parsed function.arguments as a mapping. The append-only observer accepted that representation, but failed while rebuilding the strict synthetic chat request used to render the completed turn, so the rollout exception was surfaced later as a missing policy history.

Normalize mapping arguments to JSON strings only in observer-owned copies before request validation. This covers both generated tool calls and historical messages that vLLM has shallow-copied and mutated while rendering. The legacy function_call shape follows the same strict request schema. Existing argument strings remain byte-for-byte unchanged, and the original request and generated message remain untouched.

Validation:

  • uv run pytest tests/unit/test_append_only.py -q (19 passed)
  • uv run ruff check src/art_inference/append_only.py tests/unit/test_append_only.py
  • uv run ruff format --check src/art_inference/append_only.py tests/unit/test_append_only.py
  • uv run ty check src/art_inference/append_only.py tests/unit/test_append_only.py

@bradhilton
bradhilton merged commit 9131ccc into main Sep 19, 2026
7 checks passed
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.

1 participant