Skip to content

fix(teacher): import _TEACHER_SYSTEM_PROMPT from its current module - #5756

Open
DocFurious wants to merge 1 commit into
odysseus-dev:mainfrom
DocFurious:fix/teacher-system-prompt-import
Open

fix(teacher): import _TEACHER_SYSTEM_PROMPT from its current module#5756
DocFurious wants to merge 1 commit into
odysseus-dev:mainfrom
DocFurious:fix/teacher-system-prompt-import

Conversation

@DocFurious

Copy link
Copy Markdown

Fixes #4962.

Problem

src/teacher_escalation.py:236 imports _TEACHER_SYSTEM_PROMPT from
src.ai_interaction, where it is no longer defined. The symbol now lives in
src/agent_tools/model_interaction_tools.py.

Result: every teacher escalation raises ImportError before the teacher is
ever called. Because maybe_escalate() is fire-and-forget, the feature fails
silently — no skill is distilled and the user sees nothing but a log warning.

Reproduced on main @ cf4e240 and dev @ d8a2059 (both 2026-07-23).

Fix

Point the import at the module that actually defines the constant:

from src.ai_interaction import _resolve_model
from src.agent_tools.model_interaction_tools import _TEACHER_SYSTEM_PROMPT

Notes

This is the same change as #4962 / PR #4967. That PR appears to have been
lost rather than reverted — the fix is absent from both branches.

Verification

With the fix applied, _call_teacher() completes against a configured
teacher endpoint and returns a valid skill payload (name, description,
when_to_use, procedure steps) that passes evaluate_turn_regex.

The symbol moved to src/agent_tools/model_interaction_tools.py; the
old import from src.ai_interaction raises ImportError on every
teacher escalation, silently disabling skill distillation.

Fixes odysseus-dev#4962
@github-actions

Copy link
Copy Markdown

⚠️ PR description — action needed

The following required sections are missing or incomplete. Please update the PR description to address them:

  • Summary is empty or too short — describe what changed and why.
  • Linked Issue — add a reference like Fixes #NNN, a bare #NNN, or a link to the issue.
  • Type of Change — check at least one box.
  • Checklist — check the duplicate-search box to confirm you searched existing issues and PRs.
  • How to Test — explain how a reviewer can verify this change. Numbered steps, the commands you ran, or a short code block all work — give a sentence or two of real detail (not just "tested locally").

This comment is deleted automatically once all sections are complete.

@github-actions github-actions Bot added the needs work PR description incomplete — please update before review label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs work PR description incomplete — please update before review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant