Repository navigation
fix(backend): replace sunset Assistants file-chat with Chat Completions - #12284
Git-on-my-level wants to merge 4 commits into
Conversation
OpenAI retired Assistants on 2026-08-26, so every /v1/threads create 404s and non-vision file chat is down. Stream PDFs as Chat Completions file parts on gpt-4.1 (documented file-input contract) and keep images on the verified gpt-5.6-luna vision lane. Failure-Class: FC-pinned-vendor-request-contract-retired Co-authored-by: Cursor <[email protected]> Co-authored-by: multica-agent <[email protected]>
Unpacking a token-budget dict into create() is untyped and fails pyright. Failure-Class: FC-pinned-vendor-request-contract-retired Co-authored-by: Cursor <[email protected]> Co-authored-by: multica-agent <[email protected]>
CI ran each unit file in its own process; incomplete BYOK/LLM stubs and a duration-guard race on desktop transcribe failed the backend suite. Co-authored-by: Cursor <[email protected]> Co-authored-by: multica-agent <[email protected]>
Upstream 7c900a9 moved the Soniox client into utils.stt.soniox but left SafeSonioxSocket / process_audio_soniox imported in streaming.py without a re-export marker; receiver.py and test_soniox_streaming.py import them through utils.stt.streaming, so strict pyright fails main and every PR merge ref. Carry the one-line marker so this backend CI lane can go green; matches the existing SafeDeepgramSocket compat re-export convention on the previous line. Co-authored-by: multica-agent <[email protected]>
4f6d9f1 to
ebd3618
Compare
|
Backend unit suite unblocked — the failure was not in this PR's diff. Upstream main has been failing its own Backend Unit Tests since the Soniox module refactor (
|
|
Superseded by #12337 |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
OpenAI retired the Assistants API on 2026-08-26. Production Cloud Run
backend/v2/messagesfile-chat has been 100% down on the non-vision path since 20:02Z: everyPOST /v1/threadsis 404, wrapped asRuntimeError('failed to create OpenAI thread').This PR replaces that retired surface with the already-healthy direct Chat Completions lane (SCA-361 RCA):
gpt-5.6-lunaas base64image_url(live-verified).{"type":"file","file":{"file_id":…}}ongpt-4.1(documented file-input contract; luna is not pinned for an untested file-part capability).purpose=vision; PDFspurpose=user_data; other docs rejected at attach asUnsupportedChatFileError.openai_thread_id/openai_assistant_idremain readable on old session docs.unsupported_attachment/provider_rejectedvsstream_failure) withstatus_code+ sanitizedparamonly.search_files_toolrides the same replacement and still returns a soft error string.Closes #3361
Closes SCA-362
RCA (SCA-361)
Last-24h
chat_responsefailures were the Assistants file-chat lane. Historical ~2% were Assistants 400s (message-create / run-create). The hard break is the sunset: 8/8 thread creates 404 after 2026-08-26 20:02Z. Files API andchat/completions200 on the same key. Agenticsearch_files_tool404s were swallowed as journey success.Test plan
file_id→ typedunsupported_attachmenterror frame + journey failureUnsupportedChatFileError; PDF →purpose=user_datasearch_files_toolprovider failure returns soft error string without raisingVerification
Focused backend unit tests for the file-chat / graph / upload / tool / inventory surfaces passed locally (
25 passedon the new Completions suite plus the updated neighbors).Failure-Class: FC-pinned-vendor-request-contract-retired