Fix OpenAI Provider with GitHub Models#3875
Merged
DOsinga merged 2 commits intoblock:mainfrom Aug 6, 2025
rzhade3:rzhade3/fix-github-models
Merged
Fix OpenAI Provider with GitHub Models#3875DOsinga merged 2 commits intoblock:mainfrom rzhade3:rzhade3/fix-github-models
DOsinga merged 2 commits intoblock:mainfrom
rzhade3:rzhade3/fix-github-models
Conversation
Signed-off-by: Rahul Zhade <rzhade3@users.noreply.github.com>
…ntent Signed-off-by: Rahul Zhade <rzhade3@users.noreply.github.com>
Collaborator
|
very nice catch - need to triple check still works with openai. It is a challenge that so-called openai compatible endpoints never seem to be, cc @DOsinga if you think we have sufficient openai coverage for this (if not perhaps need to have streaming test cases added for this PR?) |
DOsinga
approved these changes
Aug 6, 2025
Collaborator
DOsinga
left a comment
There was a problem hiding this comment.
Nice find! thanks for jumping on to this
katzdave
added a commit
that referenced
this pull request
Aug 6, 2025
* 'main' of github.com:block/goose: Make the window title reflect what we are doing (#3883) additional metrics + Ui implementation (#3871) feat: Add session description editing functionality (#3819) Update filename in contributing docs (#3866) Fix voice dictation provider selection bug (#3862) doc: Update supported container runtimes (#3874) feat: add OAuth provider abstraction for CLI configuration (#3157) Don't ignore lockfiles on linux/windows builds (#3859) Use RMCP for StreamableHTTP OAuth support (#3845) Try to keep key order for Databricks (#3876) Fix OpenAI Provider with GitHub Models (#3875) Cmd click open finder (#3807) fix: recipe parameter form max height and not scrolling (#3879) fix: optimise reading large file content (#3767) fix: replace glob/grep tool with shell (#3834) docs: Add Youtube Link to dev.to tutorial (#3869)
katzdave
added a commit
that referenced
this pull request
Aug 6, 2025
* 'main' of github.com:block/goose: Make the window title reflect what we are doing (#3883) additional metrics + Ui implementation (#3871) feat: Add session description editing functionality (#3819) Update filename in contributing docs (#3866) Fix voice dictation provider selection bug (#3862) doc: Update supported container runtimes (#3874) feat: add OAuth provider abstraction for CLI configuration (#3157) Don't ignore lockfiles on linux/windows builds (#3859) Use RMCP for StreamableHTTP OAuth support (#3845) Try to keep key order for Databricks (#3876) Fix OpenAI Provider with GitHub Models (#3875) Cmd click open finder (#3807) fix: recipe parameter form max height and not scrolling (#3879) fix: optimise reading large file content (#3767) fix: replace glob/grep tool with shell (#3834) docs: Add Youtube Link to dev.to tutorial (#3869)
michaelneale
added a commit
that referenced
this pull request
Aug 7, 2025
* main: Upgrade to MCP-UI ~5.6.2 and handle internalized auto iframe resizing (#3889) docs: recipe updates (#3844) added notes about reducing context window by referencing external files (#3895) Make the window title reflect what we are doing (#3883) additional metrics + Ui implementation (#3871) feat: Add session description editing functionality (#3819) Update filename in contributing docs (#3866) Fix voice dictation provider selection bug (#3862) doc: Update supported container runtimes (#3874) feat: add OAuth provider abstraction for CLI configuration (#3157) Don't ignore lockfiles on linux/windows builds (#3859) Use RMCP for StreamableHTTP OAuth support (#3845) Try to keep key order for Databricks (#3876) Fix OpenAI Provider with GitHub Models (#3875) Cmd click open finder (#3807) fix: recipe parameter form max height and not scrolling (#3879)
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.
Goose was failing to properly serialize streamed content from GitHub Models using the OpenAI provider due to subtle differences in the response body from OpenAI vs GitHub Models. Namely:
modelkey.content: null, which needs to be special cased as this is neither a text block nor a tool block.I have addressed these issues by making the streaming parser logic less strict, allowing for slight variations in implementation to allow GitHub Models to continue to be usable with Goose.
I had originally reported this in #3615, but mistakenly closed it out as a duplicate of an unrelated issue.
If you'd like to diff the OpenAI vs GitHub Models response bodies, I've provided them below:
OpenAI vs GitHub Models API Sample Responses
OpenAI Response
GitHub models response