fix(agents): enforce exact profile model identity (#3473)

Co-authored-by: ayattara <alassane.yattara@savoirfairelinux.com>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
This commit is contained in:
Alassane
2026-09-15 18:11:43 -04:00
committed by GitHub
parent 4ef775afc9
commit 739eabc49a
141 changed files with 4136 additions and 2338 deletions
+27 -39
View File
@@ -161,6 +161,8 @@ Select an agent, create a profile, then open **Settings > Agents > _Agent_ > _Pr
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Label shown in workflow, session, and automation selectors. |
| Model | Requested through ACP when the agent supports model selection. Leaving it unset uses the agent's default where the form allows that. |
| Require exact model | Per-profile opt-in. When enabled, Kandev stops before inference unless the executor advertises and accepts the saved model. It disables fallback controls without erasing their saved values. |
| Fallback settings | Compatible profiles can use an advertised explicit fallback or automatic provider-default continuation. If the saved model is absent and exactly one bracketed variation is advertised, Kandev can use that variation with a warning. |
| Mode | Requested with ACP `session/set_mode`. The choices come from the installed agent. |
| Configuration options | Dynamic ACP values requested with `session/set_config_option`. |
| CLI flags | Enabled entries are tokenized and appended to the ACP launch command. |
@@ -187,31 +189,6 @@ change makes a saved option value unsupported, Kandev removes that value after
a successful resolution; a failed resolution keeps the draft unchanged so you
can retry it.
### Model IDs and executor catalogs
The host model probe is an editing hint. The selected executor owns the model
catalog at launch. Kandev resolves a saved model in this order:
1. Use the exact requested model when the executor advertises it.
2. Use the advertised explicit fallback when the requested model is absent.
3. Use one unique bracketed variation when the requested model is absent and
the executor advertises exactly one matching ID.
4. Use the agent's current or default model when no earlier choice applies.
Profiles with automatic fallback enabled keep the legacy behavior when the
saved model is absent: Kandev ignores the explicit fallback and does not infer
a variation. It uses the agent's current or default model instead.
For example, a saved `opus` model can launch as `opus[1m]` when that is the
only advertised `opus[...]` ID. If the executor advertises both
`opus[270k]` and `opus[1m, fast]`, Kandev does not choose either variation.
Variation text is opaque and model IDs remain case-sensitive.
Kandev shows a warning when the launch result differs from the saved model.
The saved profile remains `opus`; Kandev does not rewrite it after applying a
unique variation or using the agent default. Recheck the executor catalog when
the warning repeats after credentials, copied configuration, or agent updates.
### Use a dynamic profile
> [!EXPERIMENTAL]
@@ -267,22 +244,33 @@ stale browser action does not replace a newer route decision.
The model list shown while editing a profile comes from a host probe. It is an
editing hint, not a launch gate. A profile remains selectable when its saved
model is missing from that host list. Profile selectors do not show a model
warning for this difference. Inspect the model list in profile settings for
discovery details. Authentication, installation, and probe-failure indicators
remain visible on profile selectors.
model is missing from that host list. Profile selectors show an amber warning
icon for this difference. On a desktop pointer, hover or focus the icon to
read its tooltip. On a touch device, select the icon to open its warning
drawer. Inspect the model list in profile settings for discovery details.
Authentication, installation, and probe-failure indicators remain visible on
profile selectors.
At task launch, the selected executor's ACP catalog is authoritative. For
profiles without automatic fallback, Kandev follows the four-step order above.
For profiles with automatic fallback enabled, an absent saved model causes no
model request, and Kandev ignores the explicit fallback and any variation.
Kandev stores one warning in task chat with the requested model and the
effective model when known. The warning also identifies the agent and executor
and asks you to check credentials, copied configuration, and the agent version.
At task launch, the selected executor's ACP catalog is authoritative. Kandev
sends the requested model only when the executor advertises it. Profiles are
compatible by default, so an unavailable saved model can use an advertised
explicit fallback, one unique bracketed variation, or the executor's current
or default model. Kandev records one warning with the requested and effective
models when it continues with a different model. Automatic fallback allows
provider-default continuation and ignores the saved explicit fallback.
The saved profile model is not changed. Optional portable configuration can
copy selected allowlisted files into a remote executor, but it cannot guarantee
that the host and executor expose the same model catalog.
Enable **Require exact model** when the profile must keep the saved model. The
executor must advertise and accept that model before the first prompt. An empty
or unsupported catalog, an unavailable model, or a failed apply stops the
session before inference. Kandev never sends an unadvertised model and never
rewrites the saved profile model.
The host model list is only an editing hint. A missing host-probe model keeps a
profile selectable and shows an advisory warning; the executor catalog decides
the launch result. Upgrades and omitted API fields keep existing profiles
compatible, with strictness off until a user enables it. Optional portable
configuration can copy selected allowlisted files to a remote executor, but it
cannot guarantee equal host and executor model catalogs.
### Monitor capability and subscription status