Skip to content

Conversation

@glinf
Copy link
Contributor

@glinf glinf commented Oct 4, 2025

Summary

  • implement Mistral provider with OpenAI-compatible requests and streaming

  • register the provider so it can be constructed via the registry

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Testing

  • manually (See screenshots below)
  • cargo test pass

Related Issues

N/A

Screenshots/Demos (for UX changes)

Screenshot 2025-10-04 at 18 55 56 Screenshot 2025-10-04 at 18 56 00 Screenshot 2025-10-04 at 18 56 53

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 4, 2025

Is this implementation not almost completely identical to openai.rs? can this not be a custom provider instead?

@DOsinga DOsinga self-assigned this Oct 4, 2025
@DOsinga DOsinga self-requested a review October 4, 2025 21:13
@glinf
Copy link
Contributor Author

glinf commented Oct 6, 2025

Appreciate the close read!

Isn't what you’re seeing the same pattern Goose already use for other OpenAI-compatible backends (eg: Groq, xAI, Azure OpenAI) ?

Each of those files largely shares the request/response glue code but still ships as a dedicated provider so goose can surface vendor defaults, auth, doc links, and model metadata without asking users to hand-author a custom-provider stanza.

IMHO Mistral deserve that first-class slot for the same reasons: we publish our own defaults (mistral-medium-latest with a mistral-small-* fast path), expose the public v1/models index so the registry stays in sync with our releases, and handle our endpoint/telemetry quirks (stream toggles, error mapping, optional custom headers) directly in the provider.

More importantly, Mistral isn’t just “another OpenAI clone”. It's a frontier lab shipping original weights and contributing them to the open-models ecosystem. Giving those models a first-party provider advertises that availability, keeps our docs discoverable,and makes it trivial for goose users to use Mistral models.

A generic custom-provider entry would lose all of that context and force every user to recreate it by hand.

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 6, 2025

I agree Mistral deserves a first rank listing, I am just trying to figure out how we make sure we don't keep copying the openai code every time and then when we need to modify the original have to modify it in multiple places etc.

can we ship this in a custom provider format, but include it by default for example?

@glinf
Copy link
Contributor Author

glinf commented Oct 9, 2025

can we ship this in a custom provider format, but include it by default for example?

Got it! I see what you mean (I think). I've revised and tested. Let me know what you think?

@glinf glinf force-pushed the glinf/add-mistral-as-provider branch 3 times, most recently from d32194b to e534e37 Compare October 9, 2025 15:34
@DOsinga
Copy link
Collaborator

DOsinga commented Oct 12, 2025

so this is what I am thinking:
#5084

you should be able to just add add the json to the binary and it will show up in the list like any native provider. how does that sound?

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 21, 2025

the declarative provider change is now merged, you should be able to use that

@glinf
Copy link
Contributor Author

glinf commented Oct 22, 2025

sounds good i'll try to have this weekend, sorry for the delay

@glinf glinf force-pushed the glinf/add-mistral-as-provider branch from e534e37 to fd7a23a Compare October 28, 2025 06:36
@glinf
Copy link
Contributor Author

glinf commented Oct 28, 2025

Nice work, works well.

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.

This is the way!

@DOsinga DOsinga merged commit 147d884 into block:main Nov 6, 2025
12 of 13 checks passed
michaelneale added a commit that referenced this pull request Nov 6, 2025
* main: (41 commits)
  Add pending extension indicator to extension panel (#5493)
  Add environment subsition for auth blocks (#5439)
  acp: ToolCallLocations and working cancellation (#5588)
  feat(providers): add Mistral AI provider (#5009)
  Listen for ctrl-c during provider request (#5585)
  Also accept null as description, not just missing (#5589)
  Document missing recipe param types (#5584)
  docs: description required for "Add Extension" in cli (#5573)
  fix: Add schema-aware numeric coercion for MCP tool arguments (#5478)
  Add uv for uvx in Justfile (#5581)
  Keep llm logs in place (#5577)
  bump to 1.12.0 (#5580)
  automate more of the release process (#5409)
  add clippy warning for string_slice (#5422)
  improve linux tray icon support (#5425)
  feat: log rotation (#5561)
  use app.isPackaged instead of checking for node env development (#5465)
  disable RPM build-ID generation to prevent package conflicts (#5563)
  Add Diagnostics Info to Q&A and Bug Report Templates (#5565)
  fix: improve server error messages to include HTTP status code (#5532)
  ...
michaelneale added a commit that referenced this pull request Nov 6, 2025
* main: (53 commits)
  acp: ToolCallLocations and working cancellation (#5588)
  feat(providers): add Mistral AI provider (#5009)
  Listen for ctrl-c during provider request (#5585)
  Also accept null as description, not just missing (#5589)
  Document missing recipe param types (#5584)
  docs: description required for "Add Extension" in cli (#5573)
  fix: Add schema-aware numeric coercion for MCP tool arguments (#5478)
  Add uv for uvx in Justfile (#5581)
  Keep llm logs in place (#5577)
  bump to 1.12.0 (#5580)
  automate more of the release process (#5409)
  add clippy warning for string_slice (#5422)
  improve linux tray icon support (#5425)
  feat: log rotation (#5561)
  use app.isPackaged instead of checking for node env development (#5465)
  disable RPM build-ID generation to prevent package conflicts (#5563)
  Add Diagnostics Info to Q&A and Bug Report Templates (#5565)
  fix: improve server error messages to include HTTP status code (#5532)
  improvement: add useful error message when attempting to use unauthenticated cursor-agent (#5300)
  fix: unblock acp via databricks (#5562)
  ...
lifeizhou-ap added a commit that referenced this pull request Nov 6, 2025
* main:
  fix: customised recipe to yaml string to avoid minininjia parsing error (#5494)
  Add pending extension indicator to extension panel (#5493)
  Add environment subsition for auth blocks (#5439)
  acp: ToolCallLocations and working cancellation (#5588)
  feat(providers): add Mistral AI provider (#5009)
  Listen for ctrl-c during provider request (#5585)
  Also accept null as description, not just missing (#5589)
  Document missing recipe param types (#5584)
  docs: description required for "Add Extension" in cli (#5573)
  fix: Add schema-aware numeric coercion for MCP tool arguments (#5478)
  Add uv for uvx in Justfile (#5581)
  Keep llm logs in place (#5577)
  bump to 1.12.0 (#5580)
  automate more of the release process (#5409)
aharvard added a commit that referenced this pull request Nov 6, 2025
* origin/main: (75 commits)
  fix: customised recipe to yaml string to avoid minininjia parsing error (#5494)
  Add pending extension indicator to extension panel (#5493)
  Add environment subsition for auth blocks (#5439)
  acp: ToolCallLocations and working cancellation (#5588)
  feat(providers): add Mistral AI provider (#5009)
  Listen for ctrl-c during provider request (#5585)
  Also accept null as description, not just missing (#5589)
  Document missing recipe param types (#5584)
  docs: description required for "Add Extension" in cli (#5573)
  fix: Add schema-aware numeric coercion for MCP tool arguments (#5478)
  Add uv for uvx in Justfile (#5581)
  Keep llm logs in place (#5577)
  bump to 1.12.0 (#5580)
  automate more of the release process (#5409)
  add clippy warning for string_slice (#5422)
  improve linux tray icon support (#5425)
  feat: log rotation (#5561)
  use app.isPackaged instead of checking for node env development (#5465)
  disable RPM build-ID generation to prevent package conflicts (#5563)
  Add Diagnostics Info to Q&A and Bug Report Templates (#5565)
  ...
wpfleger96 added a commit that referenced this pull request Nov 6, 2025
* main: (60 commits)
  fix: add standard context menu items to prevent empty right-click menu (#5616)
  Bump openapi in prepare-release (#5611)
  docs: add access control section to Developer tutorial (#5615)
  Token state not showing on load, or after message is finished. (#5606)
  Change the other location too (#5608)
  feat(ui): bring back quick launcher (#5144)
  Support platform tools through CLI (#5570)
  Avoid web double write (#5601)
  fix: gemini flash -> pro for mcp smoke tests (#5574)
  Manual compaction test and fix (#5568)
  fix: tidy up claude cli handling (#5594)
  Remove jetbrains (#5602)
  feat(githubcopilot): add support for newer Copilot AI Models (#5603)
  fix: customised recipe to yaml string to avoid minininjia parsing error (#5494)
  Add pending extension indicator to extension panel (#5493)
  Add environment subsition for auth blocks (#5439)
  acp: ToolCallLocations and working cancellation (#5588)
  feat(providers): add Mistral AI provider (#5009)
  Listen for ctrl-c during provider request (#5585)
  Also accept null as description, not just missing (#5589)
  ...
fbalicchia pushed a commit to fbalicchia/goose that referenced this pull request Nov 7, 2025
Surendhar-N-D pushed a commit to Surendhar-N-D/goose that referenced this pull request Nov 17, 2025
arul-cc pushed a commit to arul-cc/goose that referenced this pull request Nov 17, 2025
@emma-squared emma-squared mentioned this pull request Nov 18, 2025
9 tasks
BlairAllan pushed a commit to BlairAllan/goose that referenced this pull request Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants