Skip to content

Conversation

@vivganes
Copy link

This fixes #169

Now model name is not restricted.

@vivganes vivganes requested a review from a team as a code owner January 27, 2026 12:49
Copilot AI review requested due to automatic review settings January 27, 2026 12:49
Copy link
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

Updates the Python SDK session configuration typing so callers can pass arbitrary model identifiers (fixes #169), rather than being restricted to a fixed Literal list.

Changes:

  • Relax SessionConfig.model type from a fixed Literal[...] to str.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SilentDemonSD
Copy link

SilentDemonSD commented Jan 27, 2026

I think it should be more specific approach than simply str !!

Like :

model: Literal["claude-sonnet-4.5", "claude-haiku-4.5", "claude-opus-4.5", "claude-sonnet-4",
                   "gpt-5.2-codex", "gpt-5.1-codex-max", "gpt-5.1-codex", "gpt-5.2", "gpt-5.1",
                   "gpt-5", "gpt-5.1-codex-mini", "gpt-5-mini", "gpt-4.1", "gemini-3-pro-preview"]

OR

More dyamic approach like list_models() [add a overhead]

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.

[python]: Type hint on SessionConfig.model should be str rather than Literal?

2 participants