[feature] Rewrite chat_with_model into proper subagent tool with configurable model roles #924
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#924
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature Request
The current
chat_with_modeltool (src/ai_interaction.py:174-210) is a raw LLM relay — it sends a single message to a model and returns the response. It has no concept of:Meanwhile,
ask_teacheris a separate hardcoded escalation path insrc/teacher_escalation.pythat duplicates much of this logic.What I Want
A unified subagent tool that replaces both
chat_with_modeland the ad-hoc teacher escalation with a configurable, role-aware subagent system:Default Behavior
Role-Based Routing
Explicit Model Override
Proposed Design
Settings (depends on #922)
default_model— same as currentcoding_model/coding_endpoint_id— for coding roleteacher_model— for teacher role (already exists)Tool Schema
Implementation Notes
role=default→ uses the same model/endpoint as the parent conversationrole=coding→ resolves tocoding_model+coding_endpoint_idrole=teacher→ resolves toteacher_model(replacesask_teacherescalation)role=<model_name>→ resolves via_endpoint_model_from_cache(currentchat_with_modelbehavior)max_turns=1), but supports multi-turn if neededMigration
chat_with_modelas a thin alias that callssubagent(role=<resolved_model>)for backward compatibilityask_teacheras an alias forsubagent(role=teacher)ask_model → chat_with_model,chat_model → chat_with_modelFiles to Change
src/ai_interaction.py— rewritedo_chat_with_modelintodo_subagentsrc/teacher_escalation.py— routeask_teacherthrough subagentsrc/tool_metadata.py— update descriptionssrc/tool_name_map.py— addsubagent → subagent,delegate → subagentsrc/settings.py— add coding model keysroutes/— any settings UI changes for model role configRelated