mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-07 17:33:33 -10:00
fix(tests): drop contradictory best_available override in auto-generator default-model tests
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3a459a2306
commit
feefc815ad
1 file changed
+7
-12
@@ -26,7 +26,6 @@ except ImportError as e:
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
_BEST_AVAILABLE = "praisonai_code.llm.catalogue.ModelCatalogue.best_available"
|
||||
|
||||
class DummyModel(BaseModel):
|
||||
pass
|
||||
@@ -52,13 +51,10 @@ class TestAutoGeneratorDefaultModel:
|
||||
# Set required API key
|
||||
os.environ['OPENAI_API_KEY'] = 'test-key'
|
||||
|
||||
# Pin the fixed representative regardless of the installed
|
||||
# litellm catalogue's capability ranking (see #5749).
|
||||
with patch(_BEST_AVAILABLE, return_value=None):
|
||||
generator = AutoGenerator(
|
||||
topic="Test topic",
|
||||
framework="praisonai"
|
||||
)
|
||||
generator = AutoGenerator(
|
||||
topic="Test topic",
|
||||
framework="praisonai"
|
||||
)
|
||||
|
||||
assert generator.config_list[0]['model'] == _RANKED_OPENAI
|
||||
|
||||
@@ -275,10 +271,9 @@ class TestWorkflowAutoGenerator:
|
||||
with patch.dict(os.environ, {}, clear=True), _patch_best_available():
|
||||
os.environ['OPENAI_API_KEY'] = 'test-key'
|
||||
|
||||
with patch(_BEST_AVAILABLE, return_value=None):
|
||||
generator = WorkflowAutoGenerator(
|
||||
topic="Test workflow"
|
||||
)
|
||||
generator = WorkflowAutoGenerator(
|
||||
topic="Test workflow"
|
||||
)
|
||||
|
||||
assert generator.config_list[0]['model'] == _RANKED_OPENAI
|
||||
|
||||
|
||||
Reference in new issue
Block a user