Skip to content

fix(backend): correct regex for openai model routing#75

Merged
dexhunter merged 4 commits intomainfrom
fix/model-routing-bug
Jul 28, 2025
Merged

fix(backend): correct regex for openai model routing#75
dexhunter merged 4 commits intomainfrom
fix/model-routing-bug

Conversation

@dexhunter
Copy link
Copy Markdown
Member

Description

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.

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.
@dexhunter dexhunter requested a review from Copilot July 28, 2025 15:21

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dexhunter dexhunter requested a review from Copilot July 28, 2025 15:28

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dexhunter dexhunter requested a review from Copilot July 28, 2025 15:29

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dexhunter dexhunter requested a review from Copilot July 28, 2025 15:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a regex pattern used for routing models to the OpenAI backend to correctly handle model aliases like 'o3' and 'o3-2025-04-16' that were previously not being matched.

  • Updates the OpenAI model detection regex to properly match model names with varying patterns
  • Ensures model aliases starting with 'o' followed by digits are correctly routed to OpenAI

@dexhunter dexhunter merged commit be9e8eb into main Jul 28, 2025
2 checks passed
@dexhunter dexhunter deleted the fix/model-routing-bug branch July 28, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants