Skip to content

fix: resolve type mismatch regarding usage summary - #55

Merged
alexzhang13 merged 1 commit into
alexzhang13:mainfrom
thomasgauthier:main
Jan 19, 2026
Merged

alexzhang13 merged 1 commit into
alexzhang13:mainfrom
thomasgauthier:main

Conversation

@thomasgauthier

Copy link
Copy Markdown
Contributor

Fixed a type mismatch in the LM handler. Raw ModelUsageSummary was directly passed to RLMChatCompletion, but it actually expects the UsageSummary wrapper.

I also updated the type hint in BaseLM to match what the clients are actually returning.

Update BaseLM.get_last_usage type hint to return ModelUsageSummary, reflecting actual client implementations.
Wrap atomic usage stats in UsageSummary within LMHandler to satisfy RLMChatCompletion type expectations and ensure consistent serialization structure.
@alexzhang13

Copy link
Copy Markdown
Owner

Nice catch, thank you!

@alexzhang13
alexzhang13 merged commit 99f4045 into alexzhang13:main Jan 19, 2026
3 checks passed
ShaneIsley pushed a commit to ShaneIsley/rlm that referenced this pull request Jan 29, 2026
Merged 4 commits from upstream (alexzhang13/rlm):
- fix: ensure docker env uses shared workspace dir (alexzhang13#48)
- fix: resolve type mismatch in usage summary propagation (alexzhang13#55)
- feat: add Daytona sandbox support (alexzhang13#36)
- fix: propagate depth and persistent parameters in DaytonaREPL (alexzhang13#71)

Resolved conflicts in rlm/core/types.py and rlm/environments/__init__.py
to integrate Daytona with our registry-based environment system.

https://claude.ai/code/session_01VU6KvWSCkKinCMxQDXdNxy
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