Skip to content

Conversation

@michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented Jul 18, 2025

working on: #3503

this will use PKCE when setting up goose for the first time to automatically setup goose with openrouter.

uses the goose crate for core logic for managing the flow and keys and installing the config, and consumes it from the cli, and also goose-server/desktop use the same logic.

unit tests for the rust side core code.

Please see this short demo of it running the desktop for first time - pops up and logs in to openrouter, then back to goose, ready to go, configured with models and keys, no manual work needed:

openrouter-desktop.mov
Screenshot 2025-07-23 at 5 26 14 pm

This is designed to be the first flow onboard experience for a brand new install of goose.

image Screenshot 2025-07-23 at 7 35 27 pm Screenshot 2025-07-23 at 5 26 26 pm Screenshot 2025-07-23 at 5 26 22 pm

Upnext:

  • finalise the goose configure type of flow for when it is brand new so it is same for CLI as desktop
  • choose default models for lead/worker and editor and test
  • remove detritus OPENROUTER_*.md files left around while it was WIP
  • Test you can get back to wall of providers (after default configuration has run - you change your mind)
  • Test you can get back to wall of providers when variable is not set
  • Consider if launch link can prompt specific flow?
  • Check can set GOOSE_SETUP=false and it will bypass (not just unset)
  • change command to be a sub command of config, not auth command

To test:

  • mv your ~/.config/goose dir out of the way (I usually rename it to goose.bak),
  • ensure you unset GOOSE_MODEL and GOOSE_PROVIDER env vars from your environment if you use them.
  • run just run-ui which will set it up fresh
  • log in to openrouter when it pops up
  • done!

@michaelneale michaelneale self-assigned this Jul 18, 2025
@michaelneale michaelneale added ui rust Pull requests that update rust code status: in progress p1 Priority 1 - High (supports roadmap) onboarding Setup/configuration/first-time user experience labels Jul 18, 2025
* main:
  Extension Library Improvements (#3541)
  fix(ui): enable selection of zero-config providers in desktop GUI (#3378)
  refactor: Renames recipe route to recipes to be consistent (#3540)
  Blog: Orchestrating 6 Subagents to Build a Collaborative API Playground (#3528)
  Catch json errors a little better (#3437)
  Rust debug (#3510)
  refactor: Centralise deeplink encode and decode into server (#3489)
  feat: deprecate jetbrains extension in favor of public one (#2589)
  feat: Add LiteLLM provider with automatic prompt caching support (#3380)
  docs: update desktop instructions for managing sessions (#3522)
  docs: update desktop instructions for session recipes (#3521)
  Replace mcp_core::content types with rmcp::model types (#3500)
  docs: update desktop instructions for tool perms (#3518)
  docs: update desktop instructions for tool router (#3519)
  Alexhancock/reapply 3491 (#3515)
  docs: update mcp install instructions for desktop (#3504)
  Docs: Access settings in new UI (#3514)
  feat: switch from mcp_core::Role to rmcp::model::Role (#3488)
  Revert "fix the output not being visible issue (#3491)" (#3511)
  fix: Load and Use recipes in new window (#3501)
@michaelneale michaelneale changed the title openrouter instant install feat: openrouter out of the box experience for goose installations Jul 21, 2025
@michaelneale michaelneale marked this pull request as ready for review July 21, 2025 08:00
* main:
  fix: use sequential when sub recipe task is 1. (#3573)
  fix: track message id to keep like with like (#3572)
  Replace mcp_core::prompt with rmcp::model types (#3561)
  feat (ui): close recipe modals with esc key (#3568)
  feat: recipes can retry with success criteria (#3474)
  Env var to set Ollama request timeout (#3516)
  Updating docs to match new UI (#3552)
  Improve Claude Code provider error message for missing CLI (#3363)
  feat: Work around Gemini API tool call quirks (#3328)
  feat(ui): Source CashSans-Bold and improve overall text rendering (#3091)
  refactor: Use openapi for recipe endpoint types and in frontend (#3548)
  Fix Google Analytics error for local dev (#3544)
* main:
  docs: desktop recipe format (#3594)
  Fix model display name not being updated immediately after leaving settings (#3587)
  Added option to summarize the chat when an error is triggered (#3598)
  Remove mcp_macros and unused types (#3581)
  fix: add fallback id to messages if none provided (#3584)
  feat: migrate ErrorData from internal mcp crates to rmcp version (#3586)
  fix: adjust subrecipe description to allow running tests (#3585)
  Scenario tests (#3430)
  feat: migrate JsonRpcMessage/Request/Response/Error/Notification from internal mcp crates to rmcp versions (#3564)
  Restore recipe parameters functionality (#3530)
  feat: Enhanced loading states with thinking icons and flying bird animation (#3478)
  Agent loop defensive (#3554)
  chore: remove needless clone() in goose/providers (#2528)
  Add recipe install warning (#3537)
  Replace mcp_core::resource::* with rmcp types (#3563)
  Add YouTube video embed to using-goosehints.md (#3560)
  fix: ensure retry-config and success-criteria are populated in openapi spec (#3575)
Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be excited to get this in! I did notice a lot of LLM comments that I think we should start to push back on a bit. similarly the catch all errors approach in ts is something to watch out for

@angelahning
Copy link
Collaborator

angelahning commented Jul 23, 2025

Screenshot 2025-07-23 at 6 24 43 PM

the initial window looks off on my local - text is greyed out.

@DOsinga
Copy link
Collaborator

DOsinga commented Jul 24, 2025

in the CLI I'm seeing this:

image

It doesn't let me pick a model at all

@michaelneale
Copy link
Collaborator Author

@DOsinga I expect as it is using the lead/worker out of the box, I bet if I simplify it then it would do better at that (although I don't think listing models will work very well with openrouter as there are now so many... not really sure what we do there longer term)

* main: (27 commits)
  Add inline python extension (#3107)
  fix: add maintainer, homepage and categories to DEB/RPM package config (#3096)
  blog: agent to agent convo (#3677)
  Possible to disable random thinking messages (#3304)
  Two VS code tutorials (#3603)
  small blog fixes (#3549)
  docs: fix installation command for YouTube Transcript MCP in servers.json (#3595)
  Docs for using Docker Model Runner as a local LLM provider.  (#3509)
  Docs: VS Code Extension move to tutorials (#3601)
  Fix working directory when session has no messages (#3513)
  goose docs MCP server (#3665)
  Remove confusing status output when testing sharing url connection and it shows 404 (#3659)
  chore: use typed notifications from rmcp (#3653)
  feat: convert GetPromptResult from mcp_core to rmcp version (#3650)
  feat: Replace usage of mcp_core Tools/ToolAnnotations in openapi schema (#3649)
  fix: ensure execution task result is shown (#3629)
  docs: Quick spotlight fix (#3633)
  alexhancock/rmcp-tools-annotations (#3617)
  fix: clean up subagent (#3565)
  Adds the `WaitingForUserInput` state (#3620)
  ...
@evangineer
Copy link

evangineer commented Jul 28, 2025

@DOsinga I expect as it is using the lead/worker out of the box, I bet if I simplify it then it would do better at that (although I don't think listing models will work very well with openrouter as there are now so many... not really sure what we do there longer term)

Looking at how Roo Code works, getting both the full current list and being able to search that list would be ideal for me. If you are doing manual configuration, you probably want the control and choice, I certainly do!

The pain was sufficient, that I found myself falling back to gemini cli for now!

As a stretch goal which is almost certainly beyond the scope here, I would like support for provider routing, but that's me. At that point, I should probably be using LiteLLM instead to handle my OpenRouter connection.
https://openrouter.ai/docs/features/provider-routing

* main:
  blog: streamlining detection development w/ recipes (#3689)
  fix: have option for cli providers to use their configured or default model  (#3683)
  docs: new blog post and corrections to an old one on goosehints (#3657)
  Resolve sub recipe path relative to the parent recipe path (#3642)
  Speed up recipe loading from deeplinks and various fixes (#3662)
  fix cmd + , not opening settings (#3694)
  Add warning when JSON env parsing fails. (#3696)
  chore: refactor session naming into provider (#3678)
  feat (ui): File picker for scheduling recipes default to recipe dir (#3611)
  fix: address issue with streamable http interactions via mcp (#3693)
  Provider scenario tests (#3688)
  Fix conversations before they hit the LLM (#3660)
  cli: add detailed instruction for WSL users (#3496)
  feat: recipe runs will now prompt for missing extension secrets (#3668)
  fix: pricing integration tests -> trying more runs for cache and retries (#3546)
@michaelneale
Copy link
Collaborator Author

michaelneale commented Jul 29, 2025

@evangineer yeah - am curious about the routing in openrouter, people can try it, but I think in the end most agents will probably do a better job for now knowing what they need (everyone is trying something though).
will check listing, aim isnt' to change how it works but just smooth the initial setup in this PR - I still think it will fall back to manual config as it does on main branch for now (PKCE really only for signup flow) - the idea for this is it is one click, you shoudn't need to pick a model to start with (but yeah - if you really want to pick one and have enough credit for it - absolutely)

@michaelneale
Copy link
Collaborator Author

@DOsinga the GUI never did use the provider list loading from the fetch (only CLI did) so may have to do that as another patch (this is already getting long): #3702 which is what you were seeing.

* main:
  fix: Ensures final output tool is available when using vector tool search (#3701)
  chore: adding in some new models token limits (#3685)
@michaelneale
Copy link
Collaborator Author

@evangineer if you had time - woudl love a issue/write up of a reasonable flow for how we can search/filter the list, yeah it is so long I can't even use it even though it is dynamically loaded in the CLI (but not GUI). We can solve it in the GUI at least I guess... but cli you want to have some TUI that filters it (we can probably also show recommended models). this flow in any case will pick an opinionated default

@michaelneale
Copy link
Collaborator Author

OK this is finally ready - I think I addressed most things (modulo things that will follow on) - so I think will merge this once it is clean - it really is just for initial experience, not advanced config (and ... what is most painful is I have to blow away my goose config to test and can't run goose while I am mucking around! you realise how much you depend on it!)

@michaelneale
Copy link
Collaborator Author

tagging @taniashiba @blackgirlbytes as this will be a new "unboxing" flow (convenience) for really new users (which we may want to update notes/docs for when released - shouldn't change anything for existing users). Note that openrouter has ability to top up with things like cashapp - so I wonder if we can make a guide (I couldn't find a URL to open) which helps people create QR code and we can top up their account if starting?

image

and then:

image

type of thing?

* main:
  chore: small refactor on agent.rs (#3703)
  docs: Add GitMCP Tutorial to Extensions Library (#3716)
  chore: Speed up CI (#3711)
  Fix tool vector tests (#3709)
  docs: GitMCP Tutorial  (#3708)
  Remove unused dependencies (#3626)
  feat: update Groq models for better tool calling support (#3676)
  chore: remove ffi libraries and related code (#3699)
  only run google analytics in prod (#3395)
  Fix typo in quickstart document (#3447)
  fix: pricing estimation for OpenRouter in goose-cli (#3675)
  fix: escape control characters in LLM tool call arguments JSON (#2893)
  feat(githubcopilot): add ability to fetch supported models (#2717)
  Create a message ID for tool response messages (#3591)
  fix: Fixed 404 broken link to extensions page in index.md (#3623)
* main:
  Blog:How OpenRouter Unlocked Our Workshop Strategy (#3726)
@michaelneale
Copy link
Collaborator Author

this is killing me - doesn't reload correctly when running fully packaged (or this is another regegression that has crept in). whatever it is, will be quite a bit more debugging (with 30 min + roundtrips) ... so not sure yet of the future of this.

@michaelneale
Copy link
Collaborator Author

ok remaining challenge: the flow will provide config by storing it straight to disk (in core goose crate, which is good practice, but GUI likes to duplicate things so still trying to work out how to make that work).

@michaelneale michaelneale merged commit 601c678 into main Jul 30, 2025
8 checks passed
@michaelneale michaelneale deleted the micn/install-with-openrouter branch July 30, 2025 07:17
lifeizhou-ap added a commit that referenced this pull request Jul 30, 2025
* main:
  Ok, well, that got out of hand (#3718)
  feat: openrouter out of the box experience for goose installations (#3507)
  Iand/make goosehints blog post visible (#3729)
  skip app-related CI jobs for doc/blog PRs (#3704)
  Blog:How OpenRouter Unlocked Our Workshop Strategy (#3726)
michaelneale added a commit that referenced this pull request Jul 31, 2025
* main:
  Remove unused Memory Mode / Computer-Controller Mode code (#3743)
  docs: Add Neon MCP Server tutorial (#3639)
  Update OSX codesigning and notarization (#3658)
  Fix slow typing in chat input with long running sessions (#3722)
  Fix html content detection regex to not include markdown autolinks (#3720)
  Must have missed this one (#3733)
  Ok, well, that got out of hand (#3718)
  feat: openrouter out of the box experience for goose installations (#3507)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

onboarding Setup/configuration/first-time user experience p1 Priority 1 - High (supports roadmap) rust Pull requests that update rust code ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants