fix: refresh selectable OpenAI models, drop incompatible GPT-3.5#174
Open
HardeepAsrani wants to merge 1 commit into
Open
fix: refresh selectable OpenAI models, drop incompatible GPT-3.5#174HardeepAsrani wants to merge 1 commit into
HardeepAsrani wants to merge 1 commit into
Conversation
3c98376 to
6fbd37d
Compare
GPT-3.5 doesn't support the structured-output (json_schema) response format Hyve requires, so it errored on every chat. Remove it and add the GPT-5.4 family (5.4 / 5.4-mini / 5.4-nano) alongside the existing GPT-4.1 and GPT-4o families. Every listed model is verified against the live API to support structured outputs plus the temperature/top_p controls. Switch the model picker to a compact dropdown (the radio list grew too tall), surfacing the selected model's description as help text. Existing sites set to GPT-3.5 fall back to GPT-4o mini (resolve_chat_model), and a still-valid but no-longer-listed saved model is preserved in the picker. Closes Codeinwp/hyve#221
6fbd37d to
ac01a9f
Compare
abaicus
approved these changes
Jun 30, 2026
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.
Refreshes the selectable OpenAI models and removes GPT-3.5, which was broken.
Problem
GPT-3.5 (
gpt-3.5-turbo-0125) doesn't support the structured-output (json_schema) response format Hyve sends on every chat request, so selecting it producedInvalid parameter: 'text.format' of type 'json_schema' is not supported…and the chat failed 100% of the time.What changed
SelectControl) instead of a tall radio list, showing the selected model's description as help text.Every listed model was verified against the live API to support everything Hyve requires — structured outputs and the
temperature/top_pcontrols. Reasoning-only models (GPT-5, GPT-5.5, theo-series, and every-protier) rejecttemperature/top_p, so they're intentionally excluded — adding them would reintroduce the same class of error.Backwards compatibility
OpenAI::resolve_chat_model()maps any stored GPT-3.5 value to the default (GPT-4o mini) at request time, so existing sites keep working with no manual change.Tests
tests/php/unit/tests/test-openai-model.phpcovers the fallback: GPT-3.5 / empty / invalid → GPT-4o mini, and supported models pass through unchanged.QA
text.format/parameter error.Closes Codeinwp/hyve#221