Browse the documentation
CAP-16: Provider conformance and model profiles
- ID:
CAP-16 - Title: Provider conformance and model profiles
- Lead:
seed - Touches:
trellis,bloom - Horizon:
next - Milestone:
M4 - CLI phase:
P4 - Status:
in-progress - Claim:
specified - Depends on: none
Why
src/provider.mjs implements validateProvider and normalizeGeneration, and src/model-alias.mjs implements local alias resolution, yet callers currently lack recorded offline provider fixtures for edge-case validation (malformed payloads, truncated outputs, slow streams) and a standard model profile record distinguishing reported, probed, and unknown capabilities. Without explicit capability provenance, workspaces risk assuming context lengths, tool calling, or constrained output support that a configured backend never proved.
What it does
CAP-16 adds recorded offline provider conformance fixtures and an epistemic model profile contract in seed, probed by trellis and consumed by bloom doctor --probe:
- Recorded provider conformance fixtures (offline, zero network):
- Plain JSON/data request-response fixture cases exercised through
validateProviderandnormalizeGenerationwith zero network I/O. - Fixture classes cover:
- valid completions with complete five-field
usageand valid completions with unreportedusage: null, - malformed responses (missing
text, non-booleancomplete, extra unknownusagefields, negative or non-integer counts, wrongmodeltype), - truncated completions (
complete: falsewith partialtext, verifyingnormalizeGenerationnever promotes truncated output tocomplete: true), - slow-stream and
AbortSignalcancellations (simulated delayed/partial chunk fixtures assertingsignalaborts cleanly without inventing a fabricated completion), - missing/unavailable model responses ensuring no silent model substitution (
provider.mdrule 2).
- valid completions with complete five-field
- Plain JSON/data request-response fixture cases exercised through
- Model profile record with explicit provenance:
- A structured model profile record captures
{ model, contextLength, toolCalling, constrainedOutput, streaming }. - Every capability slot carries an explicit value plus provenance tag from the closed enum
"reported","probed", or"unknown"(or structured{ value, source }wheresourceis"reported" | "probed" | "unknown"andvalueisnullwhen"unknown"). seedvalidates profile records so"unknown"is never coerced into a guessed context window ortruetool-calling flag.
- A structured model profile record captures
- Consumer behavior in
bloomand probes intrellis:bloom doctor --proberuns injected/configured endpoint diagnostics, populates a conforming model profile (probedfor directly verified capabilities,reportedfor unverified declarations,unknownfor anything unavailable), and uses that profile to drive prompt style, context budget sizing, and constrained output mode without guessing.trellisexecutes provider conformance probes over injected adapters usingseed’s fixture set without touching any live network service insideseed.
Contract touchpoints
seed:docs/contracts/provider.md(adds recorded offline conformance fixture expectations and the model profile contract withreported/probed/unknownprovenance).trellis:docs/contracts/probes.md(provider conformance probe suite over injected adapters).bloom:docs/architecture.md(bloom doctor --probeprofile capture and profile-driven prompt style, budget, and constrained output selection).
Tool IDs and events
Tool IDs
None defined by this capability.
| Tool ID | Effect | Third-party egress | Owner gate | Summary |
|---|
Events
None defined by this capability. Probe diagnostic output and runtime trace events belong to CAP-10.
| Event | Emitter | Payload summary |
|---|
Acceptance tests
conformance-fixtures-run-offline: Every recorded request/response fixture executes undervalidateProviderandnormalizeGenerationwithfetchdisabled and zero network calls.malformed-and-truncated-fixtures-fail-closed: Malformed usage/field fixtures return{ ok: false }with specific violation messages, and truncated fixtures keepcomplete: falsewithout promotion tocomplete: true.slow-stream-abort-produces-no-fabrication: Simulated slow-stream fixtures interrupted byAbortSignalhalt cleanly and never record a fabricatedcomplete: truegeneration.model-profile-preserves-unknown: Model profile validation requires each capability (contextLength,toolCalling,constrainedOutput,streaming) to be labeledreported,probed, orunknown, rejecting guessed defaults forunknownslots.bloom-doctor-probe-drives-prompt-config:bloom doctor --probebuilds a valid model profile and selects prompt style, context budget, and constrained output settings strictly from confirmedprobed/reportedvalues while falling back safely onunknown.
Slices
CAP-16.1(seed, milestoneM4, statuslanded): Ship recorded offline provider conformance fixtures (including malformed, truncated, slow-stream) and the model profile contract/validator inseed.CAP-16.2(trellis, milestoneM4, statusproposed): Implement provider conformance behavior probes over injected test adapters (trellis).CAP-16.3(bloom, milestoneM4, statuslanded): Implementbloom doctor --probemodel profile detection and profile-driven prompt style, budget, and constrained output wiring (bloom).
Non-goals
- Opening network connections, probing ports, or discovering endpoints from inside
seed(test/model-alias.test.mjsenforces zero network/listener code inseed/src/). - Recording endpoint addresses, hostnames, or credentials inside model profiles or trace logs.
Family rules and conflicts
- No silent fallback: Unavailable models or unknown capability slots stay
unknownor error cleanly; neitherseednorbloomsilently substitutes another model or guesses an optimistic context limit. - Missing metrics stay null: Conforms strictly to
provider.mdrule 1 (null, never0, never invented) andCAP-10privacy rules (no endpoint address logged). - Local-first tests: All
seedfixtures run offline with zero credentials or network dependencies.
Open owner decisions
D20Decided 2026-11-24 in bloom#7: Timeouts: 5 seconds for the models list and 30 seconds for the one-token streaming request? The spec leaves these open. (Recommend yes.) Owner’s answer, verbatim: “Accept all”.D21Decided 2026-11-24 in bloom#7: Unknown tool calling: if the probe can’t confirm native tool calling, the loop keeps the fenced json action format from D16 instead of refusing to start. The loop only uses that text format anyway. (Recommend fallback.) Owner’s answer, verbatim: “Accept all”.D22Decided 2026-11-24 in bloom#7: Where the profile lives:doctor --probewritesprofiles.jsonin bloom’s data directory, keyed by provider config name and model alias, and the coding loop reads it. If there is no profile, every slot counts as unknown and the loop uses default budgets. The file holds no address. (Recommend yes.) Owner’s answer, verbatim: “Accept all”.D23Decided 2026-11-24 in bloom#7: What gets probed: only the models list and the fixed one-token streaming request. Context length, constrained output and tool calling arereportedonly if the models list exposes them, andunknownotherwise. No extra probe request carries a tools or schema field. (Recommend yes.) Owner’s answer, verbatim: “Accept all”.D24Decided 2026-11-24 in bloom#7: Exit code:doctor --probeexits 1 on anyfail, such as unreachable or the configured alias missing. Anunknownnever fails. (Recommend yes.) Owner’s answer, verbatim: “Accept all”.
Evidence
CAP-16.1is exercised by four cases intest/provider-conformance.test.mjsover thirteen recorded cases intest/fixtures/provider-conformance.json, run withfetchdisabled, and by five cases intest/model-profile.test.mjscovering unknown slots, missing provenance, closed value types, a closed record with no endpoint field, and frozen copies.CAP-16.3is exercised in bloom bytest/doctor-probe.test.mjs(bloom-doctor-probe-drives-prompt-config,probe-unknown-never-pass,probe-failure-reasons-and-exit-codes,probe-output-never-contains-endpoint-marker) against a fake server through an injected fetch, and bycli-doctor-probe-profile-drives-runintest/cli-coding.test.mjs.
Changes
2026-11-24: Record the CAP-16.3 probe decisions D20 to D24 and mark the bloom slice landed (CAP-16, bloom#7).2026-11-24: Ship recorded offline conformance fixtures and the model profile validator in seed 0.10.0 (CAP-16, seed#4).2026-11-23: AddedM4slice milestones acrossCAP-16.1..CAP-16.3.2026-11-23: Initial capability specification created (CAP-01.2scaffold).