make sure the models are using streaming properly#6331
Merged
lifeizhou-ap merged 6 commits intomainfrom Jan 6, 2026
Merged
Conversation
DOsinga
approved these changes
Jan 5, 2026
| .client | ||
| .post(url) | ||
| .headers(headers) | ||
| .header("Authorization", format!("Bearer {}", token)); |
Collaborator
There was a problem hiding this comment.
is this right? we have authorization types for the client, we shouldn't be setting this by hand I would think
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where usage statistics were not being set correctly in response data when using streaming models with the GitHub Copilot provider. The fix standardizes the provider's implementation to match patterns used by other providers.
- Refactored the
postmethod to returnResponseinstead ofValueand useApiClient - Added
streammethod to support proper streaming functionality - Added
supports_streamingmethod to identify models that support streaming
| stream_openai_compat(response, log) | ||
| } | ||
|
|
||
| /// Fetch supported models from GitHub Copliot; returns Err on failure, Ok(None) if not present |
There was a problem hiding this comment.
Typo in comment: "Copliot" should be "Copilot".
Suggested change
| /// Fetch supported models from GitHub Copliot; returns Err on failure, Ok(None) if not present | |
| /// Fetch supported models from GitHub Copilot; returns Err on failure, Ok(None) if not present |
zanesq
added a commit
that referenced
this pull request
Jan 6, 2026
* 'main' of github.com:block/goose: refactor: when changing provider/model,load existing provider/model (#6334) chore: refactor configure_extensions_dialog to reduce line count (#6277) chore: refactor handle_configure to reduce line count (#6276) chore: refactor interactive session to reduce line count (#6274) chore: refactor docx_tool to reduce function size (#6273) chore: refactor cli() function to reduce line count (#6272) make sure the models are using streaming properly (#6331) feat: add a max tokens env var (#6264) docs: slash commands topic (#6333) fix(ci): prevent gh-pages branch bloat (#6340) chore(deps): bump qs and body-parser in /documentation (#6338) Skip the smoke tests for dependabot PRs (#6337)
10 tasks
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
Type of Change
AI Assistance
Testing
Related Issues
Relates to #ISSUE_ID: #5907
Discussion: LINK (if any)