feat: add Claude 4, OpenAI o-series, xAI Grok, and DeepSeek to KnownModelName#2235
Open
GopalGB wants to merge 1 commit into567-labs:mainfrom
Open
feat: add Claude 4, OpenAI o-series, xAI Grok, and DeepSeek to KnownModelName#2235GopalGB wants to merge 1 commit into567-labs:mainfrom
GopalGB wants to merge 1 commit into567-labs:mainfrom
Conversation
…odelName Add missing model entries to the KnownModelName type alias: Anthropic: - claude-opus-4-0-20250514 - claude-sonnet-4-0-20250514 - claude-sonnet-4-6-20250627 - claude-haiku-4-0-20250414 OpenAI o-series (reasoning models): - o1, o1-mini, o1-preview (with dated variants) - o3, o3-mini (with dated variants) - o4-mini xAI (Grok): - grok-3, grok-3-fast, grok-3-mini, grok-3-mini-fast DeepSeek: - deepseek-chat, deepseek-reasoner These providers were already supported in from_provider() but their models were not listed in KnownModelName, so IDE autocompletion and type checking did not surface them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KnownModelNametype alias ininstructor/models.pyModels Added
Anthropic Claude 4 family:
claude-opus-4-0-20250514claude-sonnet-4-0-20250514claude-sonnet-4-6-20250627claude-haiku-4-0-20250414OpenAI o-series (reasoning models):
o1,o1-mini,o1-preview(with dated variants)o3,o3-mini(with dated variants)o4-minixAI (Grok):
grok-3,grok-3-fast,grok-3-mini,grok-3-mini-fastDeepSeek:
deepseek-chat,deepseek-reasonerMotivation
These providers are all listed in
supported_providersand work withfrom_provider(), but their models were not included in theKnownModelNameLiteral type. This means:strinstead of getting type-safe model namesTest plan
from_provider("anthropic/claude-sonnet-4-6-20250627")worksfrom_provider("openai/o3-mini")worksfrom_provider("xai/grok-3")worksfrom_provider("deepseek/deepseek-chat")works