Generalize CodexAgentBackend → LLMAgentBackend (#234)#362
Closed
larstalian wants to merge 1 commit into
Closed
Conversation
CodexAgentBackend had no codex-specific code; it just wraps an LLMBackend into a single-shot, tool-less AgentBackend, defaulting to CodexBackend when none is passed. Rename it to LLMAgentBackend so "Codex" appears in exactly one place (CodexBackend). The CodexBackend default fallback is kept intact. No backward-compat alias (pre-1.0). Closes #234 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CodexAgentBackend(src/openrange/agent_backend.py) had no codex-specific code — it just wraps anLLMBackendinto a single-shot, tool-lessAgentBackend, defaulting toCodexBackendwhen no backend is passed. The "Codex" in the name was misleading, since the only codex-specific code lives inCodexBackend(src/openrange/llm.py).This renames the class to
LLMAgentBackendso "Codex" appears in exactly one place.CodexBackenddefault-fallback behavior is kept intact — the constructor still defaults toCodexBackend(model=model)when no backend is given. Only the error strings and docstrings were updated to sayLLMAgentBackend.agent_backend.py,__init__.py(import +__all__),tests/test_agent_backend.py,tests/test_office_persona.py(including the tool-injection error-message assertions),examples/codex_eval.py,packages/openrange-pack-sdk/_protocols.py, andpackages/openrange-pack-sdk/README.md.CodexAgentBackendacross the repo: zero hits remaining.Closes #234
Test plan
ruff checkon impacted files — cleanmypyonsrc/openrange/agent_backend.py+src/openrange/__init__.py— cleanpytest tests/test_agent_backend.py tests/test_office_persona.py— 29 passed, 2 skipped (strands optional dep)🤖 Generated with Claude Code