Skip to content

fix: also try matching namespaced prefix for modelinfo candidate#12658

Merged
sayan-oai merged 3 commits intomainfrom
dev/sayan/longest-contains
Feb 24, 2026
Merged

fix: also try matching namespaced prefix for modelinfo candidate#12658
sayan-oai merged 3 commits intomainfrom
dev/sayan/longest-contains

Conversation

@sayan-oai
Copy link
Collaborator

@sayan-oai sayan-oai commented Feb 24, 2026

What

Try matching \w+-namespaced model after longest prefix as heuristic to match ModelInfo from list of candidates.

This shouldn't regress existing behavior:

  • gpt-5.2-codex -> gpt-5.2 if gpt-5.2-codex not present
  • gpt-5.3 -> gpt-5 if gpt-5.3 not present
  • gpt-9 still doesn't match anything

while being more forgiving for custom prefixes:

  • oai/gpt-5.3-codex -> gpt-5.3-codex

Tests

Added unit test.

@sayan-oai sayan-oai changed the title fix: longest prefix -> longest contains for modelinfo candidate fix: move from longest prefix to longest contains for modelinfo candidate Feb 24, 2026
@sayan-oai sayan-oai changed the title fix: move from longest prefix to longest contains for modelinfo candidate move from longest prefix to longest contains for modelinfo candidate Feb 24, 2026
@sayan-oai sayan-oai changed the title move from longest prefix to longest contains for modelinfo candidate fix: also try matching namespaced prefix for modelinfo candidate Feb 24, 2026
@sayan-oai sayan-oai merged commit 0b6c2e5 into main Feb 24, 2026
37 of 39 checks passed
@sayan-oai sayan-oai deleted the dev/sayan/longest-contains branch February 24, 2026 18:57
@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants