Recorded provider/model capabilities¶
CapabilityRegistry holds operator-recorded observations for an exact API
prefix, upstream protocol and model ID. It does not infer support from a model
name, an HTTP 200, or a model-catalog entry. Records include an ISO checked_at
date and a documentation/probe evidence description. Entries do not expire
automatically; operators must refresh observations when providers change.
Each feature is true, false, or unknown (omitted). Prefix hostnames are normalized case-insensitively and trailing slashes are removed; paths, model IDs and protocols remain distinct. No wildcard, cross-protocol or cross-vendor inheritance is performed. Duplicate entries and URLs containing credentials/query/fragment are rejected. The JSON registry is bounded at 2 MiB and must not contain secrets.
The feature vocabulary also includes strict_tools (ordinary strict function
definitions), stop_sequences (request controls), and image_tool_results
(distinct from ordinary user images). These are checked on the actual
outbound representation, not inferred from a provider name or tool schema text.
custom_tools separately covers native custom definitions and history. Ordinary
function support does not imply custom-tool or grammar support. No actual
provider/model has been newly certified for custom tools by these fixture tests.
See the registry example for its versioned JSON format. The example is illustrative, not verified provider data.
from protoverta import CapabilityRegistry
registry = CapabilityRegistry.load("capabilities.json")
report = registry.preflight(
"https://provider.example/v1", "chat",
{"model": "your-model-id", "stream": True,
"messages": [{"role": "user", "content": "Hello"}]},
require_verified=True,
)
print(report.supported, report.unknown, report.unsupported)
By default preflight blocks explicit false entries and reports unknown features.
require_verified=True additionally blocks missing observations. A report
contains only feature names, not prompts, credentials or response bodies.
request_features() inspects outbound options; it does not validate or convert
the request itself. Convert first when using the library directly.
The gateway checks the final outbound request after compatibility profiles, conversion, and reasoning overrides, before any upstream network call. This applies to both native and translated requests:
--capabilities-file capabilities.json
--require-verified-capabilities
The Python options are GatewayConfig(..., capabilities=registry, require_verified_capabilities=True). Omitting the registry keeps existing
behavior. Requiring verified capabilities without a registry is an error.
Recognized features: text, streaming, tools, forced_tool_choice,
json_object, json_schema, strict_json_schema, reasoning_effort, public_reasoning, images,
top_p, mid_conversation_system, custom_tools, strict_tools,
stop_sequences, and image_tool_results. Feature detection inspects content, not arbitrary
tool schema properties. Records cannot enable conversions the core does not
implement: for example, an image-capable model does not enable image tool results
targeting Chat or provider-owned Files API IDs. Messages/Responses image tool
results require their separate feature observation. Ordinary user image inputs
have a separate portable contract.
Both consumer development branches expose the registry path and strict option
in their provider editors. Paths are resolved relative to the configuration
file, not the working directory. Basic launch checks run before setup hands off
the terminal; each actual outbound request is checked again for tools, formats
and other recognized features. The editors reference a registry file; they do
not create observations or claim support from the model catalog. These changes
were published with the pinned 0.3.0a5 preview release. The 0.3.0a6 preview
adds user images and opt-in unsigned public reasoning; earlier wheels do not
contain those conversions.
Recorded limits (schema version 2)¶
Version 1 registries remain supported unchanged. Version 2 optionally adds
max_output_tokens, context_window_tokens (positive integers), and
reasoning_efforts (a nonempty array of distinct known effort strings) per
model record. The original exact prefix/protocol/model scope and dated evidence
requirements still apply. These fields are rejected in version 1 instead of
silently changing its meaning.
Preflight rejects an explicit output budget exceeding a recorded maximum and
an explicit effort not in a recorded allowlist, before upstream I/O. It never
clamps the request, picks a different effort or infers a limit from error text.
Absent limits mean unknown, not unlimited or verified. require_verified
continues to require feature observations; it does not require every optional
numeric metadata field to be present.
The context-window value is metadata only: without an exact tokenizer and a
protocol/model-specific accounting contract, the gateway does not pretend it
can calculate an accurate input budget. Retrieve an immutable record through
registry.lookup(base_url, protocol, model); no record inheritance or model-name
heuristic is used. Effort metadata does not enable nonportable conversions in
the strict core, which still maps only its documented effort subset.