Skip to content

Commit 19e93db

Browse files
committed
Remove deprecated default_model constant
- Remove legacy default_model constant from PackageConstants - Update llm_interface.py to raise error for unknown providers instead of falling back - All provider defaults now consistently use default_models dict - Improves error messages for unsupported providers
1 parent a79e5b5 commit 19e93db

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/cell_annotator/_constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class PackageConstants:
1010
min_markers: int = 15
1111
use_raw: bool = False
1212
default_min_color_distance: float = 4.0 # Delta E threshold for color distinguishability
13-
default_model: str = "gpt-4o-mini" # Legacy default for backward compatibility
1413
default_models: dict[str, str] = {
1514
"openai": "gpt-4o-mini",
1615
"gemini": "gemini-2.5-flash-lite",

src/cell_annotator/model/llm_interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ def __init__(
6161
provider = self._detect_provider_from_model(model)
6262
elif provider is not None and model is None:
6363
# Provider specified, use default model for that provider
64-
model = PackageConstants.default_models.get(provider, PackageConstants.default_model)
64+
if provider not in PackageConstants.default_models:
65+
raise ValueError(
66+
f"Unknown provider '{provider}'. Supported providers: {PackageConstants.supported_providers}"
67+
)
68+
model = PackageConstants.default_models[provider]
6569

6670
# At this point, both provider and model should be strings
6771
assert provider is not None, "Provider should not be None at this point"

0 commit comments

Comments
 (0)