Skip to content

Conversation

aksg87
Copy link
Collaborator

@aksg87 aksg87 commented Aug 14, 2025

Description

Adds GPT-5 model support (gpt-5, gpt-5-mini, gpt-5-nano) and improves temperature handling for better model compatibility.

  • Register GPT-5 patterns in OpenAI provider
  • Default temperature to None (uses model defaults, required for GPT-5-nano)
  • Use InferenceConfigError for clearer error messages
  • Document using ModelConfig for custom providers

Fixes #141

Feature

How Has This Been Tested?

Verified with GPT-5-nano API.

Checklist:

  • I have read and acknowledged Google's Open Source
    Code of conduct.
  • I have read the
    Contributing
    page, and I either signed the Google
    Individual CLA
    or am covered by my company's
    Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked
    issue(s) and we have agreed upon the general approach.
  • I have made any needed documentation changes, or noted in the linked
    issue(s) that documentation elsewhere needs updating.
  • I have added tests, or I have ensured existing tests cover the changes
  • I have followed
    Google's Python Style Guide
    and ran pylint over the affected code.

- Register GPT-5 patterns in OpenAI provider
- Default temperature to None to use model defaults
- Use InferenceConfigError for better error messages
@github-actions github-actions bot added the size/S Pull request with 50-150 lines changed label Aug 14, 2025
@aksg87 aksg87 self-assigned this Aug 14, 2025
@aksg87 aksg87 merged commit 8c99a21 into main Aug 14, 2025
14 checks passed
aksg87 added a commit that referenced this pull request Aug 21, 2025
- Register GPT-5 patterns in OpenAI provider
- Default temperature to None to use model defaults
- Use InferenceConfigError for better error messages
sinnaj pushed a commit to sinnaj/langextract that referenced this pull request Sep 3, 2025
- Register GPT-5 patterns in OpenAI provider
- Default temperature to None to use model defaults
- Use InferenceConfigError for better error messages
aksg87 added a commit that referenced this pull request Sep 12, 2025
- Register GPT-5 patterns in OpenAI provider
- Default temperature to None to use model defaults
- Use InferenceConfigError for better error messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Pull request with 50-150 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPT-5 models not recognized - No provider registered for model_id='gpt-5-nano'

1 participant