fix: Bug P1 omniroute provider compatibility issues - #240
Closed
JamesDAdams wants to merge 1 commit into
Closed
Conversation
- omit top_p from request body when undefined (strict providers reject null) - add items field to project-tasks tool attachments array schema (Gemini rejects arrays without items) - improve LLM stream error log to include message via String(error)
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
Fix compatibility issues with strict OpenAI-compatible providers (Omniroute, Gemini via proxy):
top_psent asnull: When notopPis configured,undefinedwas serialized tonullin the JSON body. Omniroute rejects this with"top_p: must be a number". Fixed by conditionally omitting the field.project-taskstool schema: Theattachmentsparameter was declared astype: "array"without anitemsfield. Gemini (via Antigravity/Omniroute) rejects this withINVALID_ARGUMENT: missing field. Fixed by addingitems: {}.logger.error('LLM stream error', { error })was serializing the Error object to{code, name}only, hiding the actual message. Fixed by usingString(error).AI-Enhanced Development
Tell what models helped shape this PR:
No AI used? Enter 'none'
Cache Impact
Does this PR affect anything cached — system prompts, tool definitions, skills, or other context?
project-taskstool definition changed (addeditems: {}toattachmentsarray schema). This affects tool definition caching for any provider that caches prompt/tool context.