Skip to content

docs: add Mistral AI model provider page for kagent 1.x (#517) - #643

Open
boxcee-interview wants to merge 1 commit into
kagent-dev:mainfrom
boxcee-interview:fix/issue-517
Open

boxcee-interview wants to merge 1 commit into
kagent-dev:mainfrom
boxcee-interview:fix/issue-517

Conversation

@boxcee-interview

Copy link
Copy Markdown
Contributor

Closes #517

What was wrong

kagent 1.x gained Mistral support (CRD field, runtimes, Helm values and UI in #2406, the controller translator in #3008), but the 1.x model-providers section had no Mistral page, so a reader following the provider pages had no route through the feature.

What this does

Adds docs-site/content/kagent/1.x/setup/model-providers/mistral.md, following the shape of the existing openai.md and xai.md pages. Every example uses api.kagent.dev/v1alpha3, the credential section describes egress header injection (not the runtime reading the key), the runtime restriction is stated as kagent and byo only, and Mistral embeddings are left out of scope — all per the issue.

The two corrections the issue names are already on main, so this PR does not repeat them:

  • agents/agent-harness.md — the Mistral matrix row already reads ✅ ✅ ❌ ❌ and the intro already says "the three that no harness accepts".
  • setup/model-providers/about-model-providers.md — the provider enum already lists Mistral as accepted.

Both landed via #529 (merged 2026-09-29), which is why this PR is a single new file.

How to Test

Hugo build passes on the repo's pinned toolchain:

docker run --rm -v <clone>:/src -w /src/docs-site hugomods/hugo:0.160.1   sh -c "hugo --config hugo.yaml --gc --minify"   # exit 0, 624 pages

The page renders at /docs/kagent/1.x/setup/model-providers/mistral/, and every internal link target (agent-harness#model-provider-support, api-ref#mistralconfig, about-model-providers, your-first-agent, byo-openai) resolves in the build. External Mistral links are skipped on PR runs by the existing link-check workflow.

Signed-off-by: Moritz Schmitz von Hülst <mschmitzvonhuelst@gmail.com>
@boxcee-interview

Copy link
Copy Markdown
Contributor Author

The deploy (Preview) check is red because fork PRs cannot read this repo's CLOUDFLARE_API_TOKEN secret: wrangler versions upload exits with 'In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN'. preview.yaml documents that fork PRs are expected to fail there. Static + content checks, linkChecker, and DCO all pass, so the content itself is fine — the upload needs a maintainer to run it (or secret sharing to be enabled for fork PRs). Happy to re-push if that helps.

Comment on lines +66 to +70
## How the credential reaches Mistral

The credential never enters the agent. kagent binds the `apiKeySecret` Secret to one destination and one header, `authorization: Bearer *** scoped to `baseUrl` or `https://api.mistral.ai`, and the Agent Substrate egress gateway injects it into each request. For the full credential model, see [About model providers]({{< link path="setup/model-providers/about-model-providers" >}}).

A `MISTRAL_API_KEY` environment variable on the runtime is a fallback for an image that reads its own key; it is not the ModelConfig path.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No other provider page has this section, and About model providers already explains the mechanism. Remove the section and add a Mistral API key row (authorization: Bearer <key>) to the header table in about-model-providers.md instead.

Comment on lines +48 to +50
| `mistral` | Settings that only the Mistral provider takes. An empty block is valid. |

A CEL rule rejects a `mistral` block on any other provider: `provider.mistral must be nil if the provider is not Mistral`.

@Rachael-Graham Rachael-Graham Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The CEL rule arrives after the reader has applied the YAML. Move it into the mistral row.

Suggested change
| `mistral` | Settings that only the Mistral provider takes. An empty block is valid. |
A CEL rule rejects a `mistral` block on any other provider: `provider.mistral must be nil if the provider is not Mistral`.
| `mistral` | Settings that only the Mistral provider takes. An empty block is valid. A CEL rule rejects a `mistral` block on any other provider. |

| `maxTokens` | A cap on the tokens generated in one response. Minimum 1. |
| `timeout` | How long to wait on a request to the provider, in seconds. Minimum 1. |

Mistral embeddings (`mistral-embed`) are out of scope for this page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is scoping guidance from the issue, not reader content. Remove it.

Suggested change
Mistral embeddings (`mistral-embed`) are out of scope for this page.

The `Mistral` provider calls the Mistral API directly. Mistral speaks the OpenAI-compatible wire protocol, but kagent exposes it as its own `provider: Mistral` value rather than routing it through the `OpenAI` provider.

> [!NOTE]
> This provider works on the `kagent` and `byo` runtimes, but not on `codex` or `claude`. For more information, see [Agent harness]({{< link path="agents/agent-harness#model-provider-support" >}}).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Issue #517 asks for a run against a real Mistral key and an on-cluster check of the kagent/byo-only restriction. Did you run either, and on which kagent version?

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.

Docs: add a Mistral AI model provider page for kagent 1.x

2 participants