Repository navigation
fix(tests): stop importing OpenAIProvider after its removal - #4185
Conversation
#3899 deleted the direct OpenAI/LiteLLM adapters as an intentional API break, but its own validation never ran this file, so main has been broken since both merged: this test still imports OpenAIProvider directly. Every non-Claude cloud model now goes through LemonadeProvider, whose wire shape (system prompt folded into messages[0]) is what the test actually needs to exercise, so swap the mock target instead of the raw OpenAI SDK client.
|
Verdict: Approve with suggestions This unbreaks Two things worth a look before merge, neither blocking:
Real-world evidenceN/A — tests-only change, no user-visible surface; no 🔍 Technical detailsIssues🟢 Test name says "cloud", setup selects the local branch (
🟢 Inline comment carries PR-body history ( CLAUDE.md → "Code Comments — Short or Skip": one short line, and don't reference the current fix or issue numbers inline — that context belongs in the commit body (where this PR already puts it well). Both nits fold into one edit: 🟢 The
🟢 Vestigial attributes on the Lemonade branch (
Strengths
|
# Conflicts: # tests/unit/test_chat_system_prompt_owner.py
|
#4183 landed in the meantime and fixed the same breakage a different way — it dropped the non-Claude case entirely rather than restoring it. Rebased this PR onto main and kept the fuller fix here, since it restores the test coverage #4183's version dropped (the OpenAI-compatible wire shape every non-Claude cloud model now goes through via |
main is broken:
test_chat_system_prompt_owner.py(added by #3864) still importsOpenAIProviderdirectly, which #3899 deleted as an intentional API break. #3899's own validation command never ran this file, so the collision only showed up once both merged.Every non-Claude cloud model now goes through
LemonadeProvider— its wire shape (system prompt folded intomessages[0]) is exactly what this test needs to exercise, so the fix swaps the mock target from a raw OpenAI SDK client toLemonadeProvider._backendinstead of reintroducing the deleted class.Test plan
python -m pytest tests/unit/test_chat_system_prompt_owner.py -q— 16 passedpython -m pytest tests/unit/ -k "chat_sdk or system_prompt or lemonade_provider or test_claude_provider or test_removed_llm_providers"— 134 passedgit grepconfirms no other references to the removedOpenAIProvider/openai_providermodule remain