Repository navigation
Description
Hi maintainers,
Following the pattern of the recently merged provider presets — Eden AI (#346), Ollama Cloud (#375), and LiteLLM (#385) — I would like to propose adding Mistral AI as a built-in provider, so users can select it with:
ocr config set provider mistral
ocr config set model codestral-latestDisclosure
I work at Mistral AI. This is a personal contribution submitted under the same preset pattern as the three PRs above; it does not ask for any special treatment relative to those.
Proposed change
One entry in internal/llm/providers.go using the existing ProtocolOpenAIChatCompletions. Mistral's Chat Completions endpoint at https://api.mistral.ai/v1 is OpenAI-compatible — verified locally by a raw HTTP smoke test and by an end-to-end ocr review run against a small staged diff.
No changes to client.go, protocol.go, resolver.go, action.yml, go.mod, or the GitHub Action inputs.
Models (deliberately minimal)
The preset only seeds the interactive picker; users can select any Mistral model via ocr config set model <name>.
codestral-latestmistral-large-latestmistral-small-latest
Auth
MISTRAL_API_KEY environment variable.
Tests
Mirrors TestLookupProvider_LiteLLMDetails in providers_test.go.
Local verification already done
make checkpasses (license, gofmt, vet, mod tidy).- Unit tests pass (
TestLookupProvider_MistralDetails,TestListProviders_Order,TestProviders_AllProtocolsCanonical). make buildpasses.internal/llmpackage coverage: 94.3 % (100 % onproviders.go).- Raw HTTP call to
POST https://api.mistral.ai/v1/chat/completionsreturned an OpenAI-shape response. - End-to-end
ocr reviewon a scratch repo containing a staged SQL injection returned a line-precise finding.
Companion draft PR
Concrete diff is available for inspection as a draft PR: #781. I am not requesting review on the PR until you confirm the direction here. If a different shape would suit the project better — or if the timing is wrong — I'll close the PR and adjust.
Thanks.
Activity
wu21-web commentedon Aug 8, 2026
This issue should be closed.