-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: openrouter provider #538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 8 changed files in this pull request and generated 2 comments.
Files not reviewed (3)
- crates/goose/src/providers/configs.rs: Evaluated as low risk
- crates/goose/src/providers/model_pricing.rs: Evaluated as low risk
- crates/goose/src/providers.rs: Evaluated as low risk
Comments suppressed due to low confidence (1)
crates/goose-server/src/configuration.rs:189
- [nitpick] The use of OpenAiProviderConfig for the OpenRouter provider might be confusing. Consider renaming OpenAiProviderConfig to a more generic name like ProviderConfig.
ProviderConfig::OpenRouter(OpenAiProviderConfig {
| if let Some(err) = check_openai_context_length_error(error) { | ||
| return Err(err.into()); | ||
| } | ||
| return Err(anyhow!("OpenRouter API error: {}", error)); |
Copilot
AI
Jan 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message 'OpenRouter API error: {}' is not very informative. Consider including more details from the error response to make debugging easier.
| return Err(anyhow!("OpenRouter API error: {}", error)); | |
| return Err(anyhow!("OpenRouter API error: {}", error.get("message").unwrap_or(error))); |
|
|
||
| const DATABRICKS_CONFIG = `export GOOSE_PROVIDER__TYPE=databricks | ||
| export GOOSE_PROVIDER__HOST=your_databricks_host | ||
| export GOOSE_PROVIDER__MODEL=claude-3-sonnet-2`; |
Copilot
AI
Jan 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Databricks configuration is missing the API_KEY environment variable. It should be added for consistency.
| export GOOSE_PROVIDER__MODEL=claude-3-sonnet-2`; | |
| export GOOSE_PROVIDER__API_KEY=your_api_key_here`; |
| defaultOpen?: boolean; | ||
| } | ||
|
|
||
| function Collapsible({ title, children, defaultOpen = false }: CollapsibleProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 🥇, the only thing to add if possible is a copy to clipboard button in the top right to make it easier to copy paste the block
zakiali
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried this out and works well!
Performance wasn't great, but the default anthropic model was claude 3 sonnnet, so that's why.. maybe we update the default to 3.5
|
Nice! Tried it out with a few other models too - nvidia/llama-3.1-nemotron-70b-instruct for example works but deepseek/deepseek-chat does not (getting a 404 Not Found) though deepseek-chat is working in cline through openrouter |
|
Do we want to expose openrouter for CLI use as well? |
* v1.0: (43 commits) feat: openrouter provider (#538) [ui] chore: tidy up gui providers (#537) [ui]: Polish and system theme fix (#533) [ui]: General ui polish to more closely match designs (#532) Latency issue fix with prepare_inference (#535) chore: use cross to build binaries (#507) feat: a system for non developers to augment developer system (#524) fix: Broken open directory and new session buttons in more menu (#520) refactor: move get_usage to provider trait (#506) fix: Make stop button more obvious (#516) fix: Enhance Dark mode menu dots visibility (#517) working on automating release of .zip and binaries and having them on each PR as well (#509) conditionally load memory system in goose server (#508) Adds 'instructions' field to InitializeResult (#511) feat: MCP client sdk (#505) Update cli-release.yml feat: added groq provider (#494) fix: use rust tls (#500) fix: Ldelalande/fix scroll (#504) feat: MCP server sdk (simple version first) (#499) ...
to try:
export GOOSE_PROVIDER__TYPE="openrouter"
export GOOSE_PROVIDER__HOST="https://openrouter.ai"
export GOOSE_PROVIDER__MODEL="anthropic/claude-3.5-sonnet"
export GOOSE_PROVIDER__API_KEY=....