fix(openai-shim): include text with image-only content#1410
Open
MikeTomlin19 wants to merge 1 commit into
Open
fix(openai-shim): include text with image-only content#1410MikeTomlin19 wants to merge 1 commit into
MikeTomlin19 wants to merge 1 commit into
Conversation
Contributor
|
can you check for the ci faling issue |
Contributor
Author
|
Checked it. The failing check is the full The run failed on these 4 tests:
Those are outside this PR's OpenAI shim/image-only content path. This PR's targeted tests and build/smoke passed locally, and the separate A rerun after the current |
2ca5a2a to
94f615c
Compare
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.
Summary
Why
Some OpenAI-compatible providers, including the Xiaomi MiMo/OpenGateway reports discussed around #425, reject image requests with
text is not setwhen the content array contains onlyimage_urlparts.Refs #425.
This is intentionally scoped to the MiMo/OpenGateway image-capable compatibility case. It does not attempt to solve text-only provider image handling, which is tracked separately by #1382/#1391.
Test plan
bun test src/services/api/openaiShim.test.tsbun test src/services/api/openaiShim.test.ts src/utils/model/modelOptions.xiaomi-mimo.test.ts src/services/api/providerConfig.local.test.tsbun run buildbun run smokegit diff --checkwebchecksmoke-and-testsreached the full suite and failed only on the same 4 unrelated tests already failing on latestmainPR Checks run 26548651163bun testlocally (3005 pass / 10 fail; failures are unrelated existing attribution, auto-compact, breaker metadata, and provider model env tests)bun run typecheck(repo-wide generated/missing-module/type errors unrelated to this patch; first failure issrc/QueryEngine.tsmissing./services/compact/snipProjection.js)