Skip to content

fix: refresh selectable OpenAI models, drop incompatible GPT-3.5#174

Open
HardeepAsrani wants to merge 1 commit into
developmentfrom
fix/refresh-openai-models
Open

fix: refresh selectable OpenAI models, drop incompatible GPT-3.5#174
HardeepAsrani wants to merge 1 commit into
developmentfrom
fix/refresh-openai-models

Conversation

@HardeepAsrani

@HardeepAsrani HardeepAsrani commented Jun 29, 2026

Copy link
Copy Markdown
Member

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 produced Invalid parameter: 'text.format' of type 'json_schema' is not supported… and the chat failed 100% of the time.

What changed

  • Added the GPT-5.4 family: GPT-5.4 / GPT-5.4 mini / GPT-5.4 nano.
  • Kept the existing GPT-4.1 / GPT-4.1 mini / GPT-4.1 nano and GPT-4o / GPT-4o mini (default unchanged).
  • Removed GPT-3.5 (broken).
  • New compact UI: the model picker is now a dropdown (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_p controls. Reasoning-only models (GPT-5, GPT-5.5, the o-series, and every -pro tier) reject temperature/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.
  • The picker preserves a still-valid but no-longer-listed saved model (e.g. an older snapshot) as an extra option, so an existing selection isn't silently dropped.

Tests

tests/php/unit/tests/test-openai-model.php covers the fallback: GPT-3.5 / empty / invalid → GPT-4o mini, and supported models pass through unchanged.

QA

  1. Hyve → Settings → Assistant: the Model field is a dropdown listing the GPT-5.4 family, GPT-4.1 family, and GPT-4o family — no GPT-3.5. The selected model's description shows below it.
  2. On a site previously set to GPT-3.5, the chat works (uses GPT-4o mini) and the picker shows GPT-4o mini selected.
  3. Pick GPT-5.4 (and the mini/nano), send a chat message on the frontend — a normal answer returns, no text.format/parameter error.

Closes Codeinwp/hyve#221

@HardeepAsrani HardeepAsrani requested a review from abaicus June 29, 2026 02:00
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

Plugin build for ac01a9f is ready 🛎️!

@HardeepAsrani HardeepAsrani force-pushed the fix/refresh-openai-models branch 2 times, most recently from 3c98376 to 6fbd37d Compare June 29, 2026 02:09
@HardeepAsrani HardeepAsrani marked this pull request as draft June 29, 2026 02:33
@HardeepAsrani HardeepAsrani marked this pull request as ready for review June 29, 2026 02:33
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
@HardeepAsrani HardeepAsrani force-pushed the fix/refresh-openai-models branch from 6fbd37d to ac01a9f Compare June 29, 2026 03:01
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.

2 participants