Skip to content

feat(session): explicit model pinning for sessions and HTTP resolution#169

Merged
duguwanglong merged 2 commits intomainfrom
feat/session-explicit-model-pinning
Apr 23, 2026
Merged

feat(session): explicit model pinning for sessions and HTTP resolution#169
duguwanglong merged 2 commits intomainfrom
feat/session-explicit-model-pinning

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

Summary

Introduces model_pinned on session metadata so provider/model can be explicitly locked, aligns HTTP _resolve_model with SessionLoop priority (including parent pinned sessions), stops persisting resolved defaults for unpinned sessions in SessionLoop, and propagates pinned models through the inbound channel dispatcher for native commands.

Testing

uv run pytest tests/agent/test_unified_session_loop.py tests/channel/test_channel.py -q

Made with Cursor

xiami762 added 2 commits April 23, 2026 13:55
- Add SessionInfo.model_pinned and helpers for pin/update/inheritance

- Align _resolve_model with SessionLoop (pinned session, parent pin)

- Persist pin when request.model is explicit; avoid persisting resolved defaults for unpinned sessions in SessionLoop

- Propagate pinned models through inbound dispatcher for /model and /new

- Add regression tests; fix PDF multimodal test to mock file_extractor

Made-with: Cursor
Keep category and inherited default task models as runtime overrides instead of persisting them as pinned session state. Only explicit child model selections or inherited pinned parent models now lock child sessions, with regression tests covering task and delegate flows.

Made-with: Cursor
@duguwanglong duguwanglong merged commit bcb7b86 into main Apr 23, 2026
2 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.

2 participants