Repository navigation
Studio: accept the standard input_audio message part - #10255
Conversation
GitHub Actions reproduction + fix verificationPinned head: The defect. On On the head it clears validation and reaches model resolution — a later, different error — and lands where the audio path reads it: Every shape, with its real status. Leg B is the first commit, before review; leg C is the converged head. Same probe, same runner.
Column B is what the first commit shipped: opening the tagged union let the two new part types reach five routes that share Column C answers every one of those with a typed error naming the cause, and the local path still takes the part. Regression tests: Legs A and D also pin the boundary: the defect still reproduces on today's The Studio UI is unaffected either way — the frontend sends Known limitation, deliberate: |
54dcda7 to
3cd1d58
Compare
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
This fixes a real validation issue. A/B checks at base e8a8854 and PR head 3cd1d58 show standard input_audio failing before inference on base and reaching the audio path on this PR. Adjacent regression tests pass: 636 on base and 660 on the PR, with the same three skips. One change before merge: audio from an earlier user turn moves onto the latest user turn, changing the model's input. The independent probe observes audio moving from turn 0 to turn 2 through _normalise_chat_content_parts and _inject_audio_part. Reject earlier-turn audio explicitly until its original position can be preserved. Real model transcription and the full OS/GPU matrix remain unverified. |
|
Done in The request no longer reaches You are right that this is the correct interim.
On the two gaps you name — both are real and I have not closed either. Every probe here drives the real routers through a |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21a57997cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| path = _resolve_or_4xx(run, checkpoint) | ||
| # Before the lock and the load: openai_chat_completions refuses these too, but only after a | ||
| # checkpoint load that can evict the resident model on its way to the same 400. | ||
| _reject_unsupported_content_parts(payload) |
There was a problem hiding this comment.
Validate audio-part placement before loading previews
When a preview request contains multiple input_audio parts, places one on a non-user role, or carries it on an earlier user turn, this call does not reject it because it only checks UnknownContentPart. The route therefore acquires the preview lock and calls load_model_for_preview, after which the delegated completion rejects the request in _normalise_chat_content_parts. These payloads previously failed validation before entering the route, so they can now trigger an expensive checkpoint load and evict the resident model despite always returning 400; run the audio-part normalization checks before loading the preview checkpoint.
Useful? React with 👍 / 👎.
| return await _proxy_to_external_provider(payload, request, current_subject) | ||
|
|
||
| # Local path only: the lift targets audio_base64, which the proxy never reads. | ||
| _normalise_chat_content_parts(payload) |
There was a problem hiding this comment.
Reject audio when the transformers model cannot consume it
When the resident non-GGUF model has has_audio_input false and no compatible auto-switch occurs, this lift removes the input_audio part and sets audio_base64, but the transformers branch only handles that field inside if payload.audio_base64 and model_info.get("has_audio_input"); otherwise it falls through to ordinary text generation. Thus a newly accepted standard audio request can receive a plausible response based only on its text while the recording is silently ignored. Add a capability rejection for payload.audio_base64 when the selected transformers model lacks audio input support.
Useful? React with 👍 / 👎.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The earlier-turn audio issue is fixed, and 666 regression tests pass. Real-model checks through Chromium, Firefox and WebKit also return the same correct transcript for both input_audio and audio_base64. Looks good to merge. |
…them The refusal added here answered input_file and file_id images, but only on a user turn and only for those two shapes. Four ways of losing an attachment in silence were left: - system, developer and assistant turns each return via `continue` before the parts loop, so an attachment on those turns was still dropped; - an input_image with neither image_url nor file_id was dropped; - an input_image whose detail falls outside the documented set fails its typed variant, degrades to the catch-all, and took a servable url down with it; - an unmodelled part was dropped, which is what /chat/completions stopped doing in #10255. _responses_tool_output_content had already written the first three rules for the same shapes arriving as a tool result, so this reuses its wording rather than inventing a second vocabulary for one question. The attachment refusal is hoisted above the role branches; the generic "parts of type 'X' are not supported" stays on the user branch so an assistant replay turn keeps its lenient text flatten and a client round-tripping prior output is not made to fail. An image carrying image_url and file_id together still resolves from the url on both paths: file_id means "instead of a url", not "in addition to one".
Sending audio the way the OpenAI SDK documents it fails right away with a validation error about the tag name, before any model runs. The content part list was closed to six types and
input_audiowas not one of them. This happens even when the loaded model can take audio, and llama-server accepts that exact part already, so people have to find the non standardaudio_base64field instead.This adds
input_audioto the accepted parts and maps it onto the same audio path that field uses. It also adds a catch all for part types we do not model, so an unknown type gets a clear message naming it rather than a raw validation dump.Tested on a live server with a real wav file. Before, the request fails with
messages.0.content.str: Input should be a valid string. After, the model receives the audio and transcribes it.