Repository navigation
Conversation
This branch has not been deployed
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.
Description
Summary
model_id,gpt-4o-mini, resolves togpt-4o-mini-2024-07-18, which OpenAI shuts down on January 14, 2027(recommended replacement:
gpt-6-luna). After that date every call thatrelies on the default fails.
gpt-6-lunaand updates the README examples,docstrings, the provider README and the bundled usage skill docs, including
a note that
temperatureneedsreasoning_effort="none"on this model.Also replaces two examples that named already-retired models (
gpt-4inlangextract/providers/README.md,gpt-3.5-turboin the skill docs).lx.extract(model_id="gpt-6-luna")) and Send max_output_tokens as max_completion_tokens to OpenAI #600 (otherwise callers who setmax_output_tokenswith the new default would sendmax_tokens). Draftuntil both merge and the release that ships it is decided.
Feature
Compatibility
model_id, for exampleOpenAILanguageModel(api_key=...)orModelConfig(provider="OpenAILanguageModel"). Callers who passmodel_idsee no change. To keep the old behavior until the shutdown, pass
model_id="gpt-4o-mini".gpt-6-lunais a reasoning model withmediumeffort by default(model page),
so latency and output tokens change (reasoning tokens are billed as
output). List price is $0.10 input / $0.50 output per 1M tokens, versus
$0.15 / $0.60 for
gpt-4o-mini. Passreasoning_effort="none"or"low"to stay closer to the old behavior.
GPT-6 guide,
temperature,top_p,top_logprobsandlogprobsare accepted only withreasoning_effort="none". Callers who settemperatureand rely on thedefault must also pass
reasoning_effort="none".max_output_tokens, so a small budget withthe default model can now end with
finish_reason=lengthand no text.the batch completes rather than immediately.
base_url) that relied on the default model namemust pass
model_idexplicitly.How Has This Been Tested?
Tests
pytest -m 'not live_api and not requires_pip and not integration':983 passed, 25 deselected.
test_openai_temperature_zerointests/inference_test.py(now also passesreasoning_effort="none", theonly form the API accepts with
temperature) andtest_explicit_provider_selectionintests/test_live_api.py.pylintis clean on thechanged files.
test_explicit_provider_selectiononly constructs it. Move OpenAI live tests off retiring GPT-4o models #601 coversgpt-6-lunarequests, including the output-schema test at default effort.Checklist
pylintover theaffected code.