Skip to content

Commit 000b95c

Browse files
committed
fix(backend): correct regex for openai model routing
The previous regex was too restrictive and did not correctly route model aliases like 'o3' or 'o3-2025-04-16' to the OpenAI backend. This change updates the regex to correctly handle these cases.
1 parent eee99d6 commit 000b95c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aide/backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
def determine_provider(model: str) -> str:
1111
# Check if model matches OpenAI patterns first
12-
if re.match(r"^(gpt-|o\d-|codex-mini-latest$)", model):
12+
if re.match(r"^(gpt-.*|o\d-.*|o\d|codex-mini-latest)$", model):
1313
return "openai"
1414
elif model.startswith("claude-"):
1515
return "anthropic"

0 commit comments

Comments
 (0)