Skip to content

Merge main + migrate parser to ParsedToolCall API#1

Merged
RNabel merged 7 commits into
poolsideai:feat/laguna-xs2-rendererfrom
PrimeIntellect-ai:feat/laguna-xs2-fix
May 13, 2026
Merged

Merge main + migrate parser to ParsedToolCall API#1
RNabel merged 7 commits into
poolsideai:feat/laguna-xs2-rendererfrom
PrimeIntellect-ai:feat/laguna-xs2-fix

Conversation

@hallerite
Copy link
Copy Markdown

Sending this as a PR against your branch so you can review + merge, since maintainerCanModify is a no-op for org-owned forks (poolsideai is an org, so direct push from the upstream side was denied).

Summary

Test plan

  • uv run pytest tests/ -k Laguna → 53/53 pass
  • uv run pytest tests/test_render_ids.py tests/test_parse_response.py tests/test_parse_response_robustness.py tests/test_roundtrip.py tests/test_preserve_thinking.py → 784 passed, 43 skipped (gpt-oss HF-parity skips), 1 xfail
  • uv run ruff check renderers/ tests/ clean
  • uv run ruff format --check renderers/ tests/ clean
  • uv run ty check renderers/laguna_xs2.py no Laguna-specific diagnostics

🤖 Generated with Claude Code

hallerite and others added 7 commits May 13, 2026 13:30
Brings in ParsedToolCall API (#22), hatch-vcs versioning (#20), Apache
2.0 license (#27), and other commits landed after the PR branched.
Resolves conflicts in renderers/__init__.py, renderers/base.py,
renderers/parsing.py, and tests/test_roundtrip.py by taking main's
ParsedToolCall shape and re-applying the Laguna additions on top.
…t_never

After merging main, the Laguna parser was still on the old ``list[dict]``
shape and 4 tests failed against ``ParsedResponse.tool_calls``'s new
``list[ParsedToolCall]`` type (introduced in #22). Mirror ``parse_glm``'s
structure: emit ``ParsedToolCall`` with a ``status`` enum
(UNCLOSED_BLOCK / MISSING_NAME / INVALID_JSON / OK) and a ``token_span``
relative to the stop-stripped stream.

Also drop ``assert_never(unexpected_role)``: ``msg["role"]`` is plain
``str`` (TypedDict), so ``ty`` flags a type-assertion-failure and any
unknown role would crash at runtime — every other renderer silently
skips unknown roles.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@hallerite hallerite force-pushed the feat/laguna-xs2-fix branch from 767e853 to 9e59cc9 Compare May 13, 2026 13:30
@RNabel RNabel merged commit 34135e3 into poolsideai:feat/laguna-xs2-renderer May 13, 2026
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.

2 participants