Task
Extract the OpenAI chat completions provider path from run_agent.py into agent/kore/providers/openai_compat.py.
This is the simplest, most common provider path and the largest single win in the extraction plan.
Current State
- Steps 0-1 completed:
agent/kore/config.py and agent/sanitization.py extracted
- Steps 2 partially done: several helper modules extracted (glm_heuristic, think_blocks, provider_headers, error_utils, tool_calls, responses_api, vision_utils, client_lifecycle, display_utils, reasoning, url_helpers, message_prep)
run_agent.py at 11,666 lines (from 12,880 original)
- 368 kore+memory+session_search+recent_context tests pass, 165 hermes_state tests pass
Approach
- AIAgent delegates its OpenAI client construction and streaming to the new module
- Delete the inline code immediately (Fowler Strangler Fig — no parallel paths)
- Existing test suite provides coverage
- Commit to dogfood branch
Reference
See plan: 庫/Agent-Hermes/plans/kore-agent-core-replacement.md
Task
Extract the OpenAI chat completions provider path from
run_agent.pyintoagent/kore/providers/openai_compat.py.This is the simplest, most common provider path and the largest single win in the extraction plan.
Current State
agent/kore/config.pyandagent/sanitization.pyextractedrun_agent.pyat 11,666 lines (from 12,880 original)Approach
Reference
See plan:
庫/Agent-Hermes/plans/kore-agent-core-replacement.md