Skip to content

Default the OpenAI provider to gpt-6-luna - #602

Draft
aksg87 wants to merge 1 commit into
mainfrom
aksg87/openai-default-gpt-6-luna
Draft

aksg87 wants to merge 1 commit into
mainfrom
aksg87/openai-default-gpt-6-luna

Conversation

@aksg87

@aksg87 aksg87 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Summary

  • The OpenAI provider's default model_id, gpt-4o-mini, resolves to
    gpt-4o-mini-2024-07-18, which OpenAI shuts down on January 14, 2027
    (recommended replacement: gpt-6-luna). After that date every call that
    relies on the default fails.
  • Changes the default to gpt-6-luna and updates the README examples,
    docstrings, the provider README and the bundled usage skill docs, including
    a note that temperature needs reasoning_effort="none" on this model.
    Also replaces two examples that named already-retired models (gpt-4 in
    langextract/providers/README.md, gpt-3.5-turbo in the skill docs).
  • Depends on Route gpt-6 model IDs to the OpenAI provider #599 (the README and skill examples call
    lx.extract(model_id="gpt-6-luna")) and Send max_output_tokens as max_completion_tokens to OpenAI #600 (otherwise callers who set
    max_output_tokens with the new default would send max_tokens). Draft
    until both merge and the release that ships it is decided.

Feature

Compatibility

  • This only affects callers who omit model_id, for example
    OpenAILanguageModel(api_key=...) or
    ModelConfig(provider="OpenAILanguageModel"). Callers who pass model_id
    see no change. To keep the old behavior until the shutdown, pass
    model_id="gpt-4o-mini".
  • gpt-6-luna is a reasoning model with medium effort 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. Pass reasoning_effort="none" or "low"
    to stay closer to the old behavior.
  • Per OpenAI's
    GPT-6 guide,
    temperature, top_p, top_logprobs and logprobs are accepted only with
    reasoning_effort="none". Callers who set temperature and rely on the
    default must also pass reasoning_effort="none".
  • Reasoning tokens count against max_output_tokens, so a small budget with
    the default model can now end with finish_reason=length and no text.
  • In Batch API mode, rejected parameters surface as per-request errors after
    the batch completes rather than immediately.
  • OpenAI-compatible servers (base_url) that relied on the default model name
    must pass model_id explicitly.

How Has This Been Tested?

Tests

  • pytest -m 'not live_api and not requires_pip and not integration':
    983 passed, 25 deselected.
  • Updated default assertions: test_openai_temperature_zero in
    tests/inference_test.py (now also passes reasoning_effort="none", the
    only form the API accepts with temperature) and
    test_explicit_provider_selection in tests/test_live_api.py.
  • isort 5.13.2 and pyink 24.3.0 checks are clean; pylint is clean on the
    changed files.
  • Not verified here: no live test sends a request through the default model;
    test_explicit_provider_selection only constructs it. Move OpenAI live tests off retiring GPT-4o models #601 covers
    gpt-6-luna requests, including the output-schema test at default effort.

Checklist

  • I have made any needed documentation changes.
  • 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.

This branch has not been deployed

No deployments
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.

1 participant