providers.toml reference#
providers.toml is the explicit boundary among absent provider execution,
deterministic sandbox execution, and chargeable live-provider execution. It
defines the operator-approved set of provider targets, selects each target's
active immutable revision, freezes operator-verified pricing, and applies the
live-spend boundary only where real provider work is possible. It does not
choose one provider or image size for every request: agents discover active
targets at runtime and select among only this approved set.
For the primary operator flow, use the complete sandbox and Gemini and FLUX examples before consulting this field-by-field reference.
Potential charges: setting
mode = "live"does not by itself perform work, but it prepares Gongbu to send requests to configured providers after the reviewed generation is active. Verify every provider value and price against current authoritative provider documentation.
Top-level fields#
schema_version#
| Attribute | Value |
|---|---|
| Required | Always |
| Supplied by | Generated by Hubu |
| Type | Integer |
| Supported value | 1 |
This is the operator-owned source schema. The rendered Gongbu provider target and pricing documents use their own service-owned schema versions.
mode#
| Attribute | Value |
|---|---|
| Required | Always |
| Supplied by | Generated by Hubu for sandbox; chosen by the operator for live mode |
| Allowed values | disabled, sandbox, live |
| Spend impact | disabled performs no provider work; sandbox uses fixtures only; live may incur charges after activation and execution |
In disabled mode, omit catalog_version, maximum_spend_minor,
live_spend_acknowledgement, every [[contract_bindings]] and [[targets]]
table, and every [[pricing_rules]] table.
schema_version = 1
mode = "disabled"
Sandbox mode is generated by hubu stack init --mode sandbox. It requires a
fixture-only target and synthetic frozen pricing, forbids live-spend fields and
provider credentials, and renders through Gongbu's production execution path.
The fixture adapter makes no external provider request.
schema_version = 1
mode = "sandbox"
catalog_version = "hubu-sandbox-v1"
Live mode requires the two spend fields plus at least one provider-contract
binding. The shipped Gemini Developer API and FLUX targets must be introduced
only through their frozen contracts. Multiple approved targets can coexist;
agents discover opaque target_id values at runtime without submitting
provider details. Generic integrations may still use the lower-level raw target
format, subject to the composite rules below.
catalog_version#
| Attribute | Value |
|---|---|
| Required | Sandbox and every composite live catalog; optional for exactly one provider contract with no raw targets or pricing |
| Supplied by | Generated by Hubu for sandbox; chosen by the operator for live mode |
| Type | Non-empty string |
| Meaning | Immutable label for the complete verified pricing catalog |
Choose a label that identifies the exact prices and source date used to prepare the catalog, for example operator-verified-2026-08-24. Never reuse a catalog version for different content. The rendered catalog is canonicalized and digested so an execution can retain the exact pricing snapshot it used.
For exactly one provider contract with no raw target or pricing entries, omit this field and Hubu derives the contract's immutable pricing version. If supplied in that contract-only shape, it must equal the frozen version. A catalog with multiple contract bindings, or any contract-bound-plus-raw catalog, requires a new operator-owned immutable label.
maximum_spend_minor#
| Attribute | Value |
|---|---|
| Required | Live mode only |
| Supplied by | Chosen and approved by the operator |
| Type | Positive integer |
| Unit | Currency minor units; currently USD cents |
This is the managed Gongbu provider configuration's explicit upper spend boundary. It is not a provider price and does not create a Hubu budget. Use a conservative ceiling appropriate for this local profile.
For USD, 25 means 25 cents and 2500 means 25 dollars. Read pricing, authorization, holds, and settlement before selecting it.
live_spend_acknowledgement#
| Attribute | Value |
|---|---|
| Required | Live mode only |
| Supplied by | Explicitly entered by the operator |
| Exact value | I_ACKNOWLEDGE_LIVE_PROVIDER_SPEND |
live_spend_acknowledgement = "I_ACKNOWLEDGE_LIVE_PROVIDER_SPEND"
The exact string is a deliberate safety gate, not a customizable description. It acknowledges that a valid active target can transmit chargeable work. It does not replace Hubu authorization, a budget, or the provider account's controls.
[[contract_bindings]]#
A contract-binding selection expands one named immutable contract into its
exact provider target, adapter settings, and pricing rules. The shipped
contracts can be bound independently, except that successive versions of one
target, such as hubu.flux-2-pro.text-to-image/v1 and its
/v2,
or hubu.gemini-3.1-flash-image.text-to-image/v1 and its
/v2,
are alternatives: bind one of them. Gemini Nano Banana 2.1 and Gemini 3 Pro
Image are separate models with their own contracts
(hubu.gemini-nano-banana-2.1.text-to-image/v1,
hubu.gemini-3-pro-image.text-to-image/v1 and their image-edit/v1
contracts); each is available only when bound. Every FLUX model also has its
own image-edit/v1 contract,
such as hubu.flux-2-max.image-edit/v1, bound beside or instead of its
text-to-image contract.
[[contract_bindings]]
contract = "hubu.flux-2-pro.text-to-image/v1"
credential = "bfl_flux2_pro"
[[contract_bindings]]
contract = "hubu.gemini-3.1-flash-lite-image.text-to-image/v1"
credential = "google_gemini_developer"
[[contract_bindings]]
contract = "hubu.gemini-3.1-flash-image.text-to-image/v1"
credential = "google_gemini_developer"
contract must match a shipped contract exactly. credential names an opaque
entry from credentials.toml; it never contains a key. Both fields are
required and unknown fields are rejected.
Each contract freezes its own model, transport, retry, dimension, and pricing behavior; the binding cannot change any of it. The Gemini Developer API provider contract and the FLUX.2 provider contract are the canonical descriptions of those frozen values. Apply the shared live provider operations guide before activation.
Raw targets cannot duplicate or parallel a contract-bound provider/adapter route, and raw pricing cannot override its provider/model rules. Contracts for the same provider may share one credential alias; different providers must use distinct credential aliases and coordinates.
[[targets]]#
Each raw target records one immutable provider configuration revision for an
internal workload/provider/adapter/model key. This format is for generic
integrations; shipped Gemini and FLUX definitions are rejected here as contract
bypasses. All raw target fields are
required, including the booleans and settings table.
Sandbox mode requires its generated fixture target, which omits credential
because it has no external secret.
targets.provider_config_version#
| Attribute | Value |
|---|---|
| Supplied by | Chosen by the operator |
| Type | Non-empty stable identifier |
| Meaning | Immutable revision label for this target's complete configuration |
Never reuse a version label with changed model, credential coordinates, activation flags, or adapter settings. Gongbu rejects a version reused with different canonical content.
targets.workload_type#
Defined by Gongbu's provider contract. Use image_generation for current image adapters. It is part of the stable target key and must be a valid identifier.
targets.provider#
Defined by the configured provider integration. Use the exact normalized provider ID expected by Gongbu and the matching pricing rules. This is not necessarily the provider's display name.
targets.adapter#
Defined by Gongbu's adapter registry. Current adapter IDs include:
gemini_developer_imagefor the Gemini Developer API image targets andflux2_apifor the FLUX.2 targets, each run from a verified provider pack (their settings usetype = "pack");fixturefor test/local fixture execution only.
A non-pack adapter ID must agree with targets.settings.type. Do not infer one from provider marketing text.
targets.model#
Defined by the provider and selected adapter. Use the exact provider model ID sent on requests and repeat the identical value in each matching pricing rule. Verify availability, API version, and billing behavior with the provider.
targets.credential#
| Attribute | Value |
|---|---|
| Supplied by | Chosen from credentials.toml |
| Meaning | Local key under [opaque.<key>] |
| Sensitive | Reference only; never a secret |
For [opaque.provider_image], use credential = "provider_image". Gongbu resolves the referenced service and account at execution time.
targets.active#
Required boolean. true makes this the active revision for its target key. Gongbu rejects more than one active revision for the same workload/provider/adapter/model key.
Use false to retain an immutable historical revision without selecting it for new work.
Every active, execution-enabled target with a complete adapter and pricing
definition appears in the sanitized runtime catalog exposed through unified MCP.
The catalog assigns an opaque target_id that remains stable when the operator
rotates the target's credential, endpoint, or configuration revision. Agents
select that ID and one of its advertised runtime image-size options; they never
receive the target's credential reference or adapter transport settings.
targets.execution_enabled#
Required boolean. true permits a selected active revision to execute new work. false is an independent emergency/operational gate. A revision must be both active and execution-enabled to accept new work.
targets.settings#
Required tagged adapter settings. settings.type selects the service-owned settings schema; non-pack settings must agree with targets.adapter. settings.config contains the adapter-specific non-secret configuration.
A target run from a provider pack uses
type = "pack" with the pack's ID, version, content digest and archetype. The
shipped contracts supply these for you; a pack target binds only to the exact
pack digest it names:
[targets.settings]
type = "pack"
[targets.settings.config]
pack_id = "bfl-flux-2"
pack_version = "2026-10-20.1"
pack_digest = "sha256:<the pack's content digest>"
archetype = "async_poll"
Fixture settings use only type = "fixture" and no config table. Fixture execution is not a live provider substitute.
Adapter setting fields#
The selected gongbu-server production validator is authoritative. Unknown
adapter-setting fields are rejected. Provider transport, response mapping and
pricing belong to the provider pack, rather than
targets.settings.config.
targets.settings.type#
Required tag. Allowed current values are pack and fixture. Fixture settings
have no config table and cannot stand in for the shipped Google or FLUX
providers.
targets.settings.config.pack_id#
Required for pack. The exact ID of the registered provider pack.
targets.settings.config.pack_version#
Required for pack. The immutable version of that pack.
targets.settings.config.pack_digest#
Required for pack. The exact sha256: content digest supplied by the pack's
shipped contract. The target binds only to that pack content; changing the
pack requires a matching contract and target revision.
targets.settings.config.archetype#
Required for pack. The pack's engine: sync_fixed, async_poll or metered.
The selected engine must be registered by Gongbu. Packs cannot enable generation
retries or change engine-owned settlement and recovery rules.
[[pricing_rules]]#
Live mode uses pricing catalog schema version 2 exclusively. Every rule is immutable within catalog_version and matches one provider/model plus an optional selector.
pricing_rules.rule_id#
Required unique, non-empty stable identifier. Choose a descriptive immutable ID such as provider-model-1k. Duplicate IDs are rejected.
pricing_rules.provider#
Required normalized provider ID. It must exactly match the target's provider value.
pricing_rules.model#
Required normalized model ID. It must exactly match the target's model value.
pricing_rules.workload_type#
Optional workload this rule prices, such as image_edit, so one model can carry
separate generation and edit prices. A rule that names a workload prices only
that workload. A rule without one prices every workload of its model that no
rule names, which is how every rule priced before v0.2.5; shipped
text-to-image contracts leave it out.
pricing_rules.currency#
Required currency code. Schema version 2 currently supports USD; it is normalized to uppercase.
pricing_rules.selector#
Optional inline table of named dimensions used to distinguish prices for the same provider/model, such as selector = { image_size = "1k" } or selector = { mode = "fast" }. A rule prices a request only when the request's selector equals the rule's selector exactly; a rule without a selector prices only requests that carry none.
Selector keys are lowercase identifiers (a–z, digits and _, starting with a letter). Values are trimmed and lowercased and may contain letters, digits, _, -, . and : (for example aspect_ratio = "16:9"). An empty selector is rejected.
A rule whose selector includes image_size prices only images: exactly one image component, or megapixel / additional_megapixel components with or without an image component, plus optional input_image or input_megapixel components for edits. Define one unambiguous rule for every enabled image size. Two rules with the same provider, model, workload, and selector are rejected.
pricing_rules.selector.image_size#
Defined by the provider's billable resolution tier and the normalized request contract. Allowed current values are 1k, 2k, and 4k after normalization. Do not use pixel dimensions unless the provider contract maps them to one of these selectors.
For the flux2_api adapter, the selectors map to the certified exact BFL
output dimensions defined in the
FLUX.2 provider contract.
An enabled FLUX target must have one selector-qualified, operator-verified
pricing rule for each of the three certified presets; a flat rule or partial
pricing set is not enough. The image_size selector is durable pricing and
replay evidence and is never sent to BFL.
pricing_rules.components#
Required non-empty array of price component tables. Each unit may appear at most once in a rule. Multi-component rules represent pricing such as one image charge plus input/output token charges.
pricing_rules.components.unit#
Required. Allowed values:
image— quantity of generated images (request quantityimage_count);input_token— billable input-token quantity (input_tokens);output_token— billable output-token quantity (max_output_tokens);request— one per provider call, whatever it returns;result— quantity of returned results (results);page— quantity of returned pages of content (pages);second— billable seconds of generated or processed media (seconds);megapixel— billed megapixels of every output image (megapixels);additional_megapixel— billed megapixels beyond the first of each output image (additional_megapixels). Pair it with animagecomponent to price "first megapixel, then each additional one". Its quantity may be zero;input_image— each input image an edit request sends (input_images).input_megapixel— billed megapixels of the input images an edit request sends (input_megapixels), as a pack'sinput_megapixelsrule counts them.
The two megapixel units are available only to provider packs, which derive them from certified output sizes and settle them from the delivered images.
A component is priced against the named request quantity shown in brackets. The estimate uses the requested quantity and settlement uses the delivered quantity, which can never exceed what was held.
pricing_rules.components.rate_numerator_minor#
Required non-negative integer numerator of the exact price in currency minor units per unit. Do not pre-round a fractional provider rate.
pricing_rules.components.rate_denominator#
Required positive integer denominator of the exact price in currency minor units per unit.
For a provider price of USD $0.067 per image, cents are the minor unit and the exact rate is 6.7 cents:
components = [
{ unit = "image", rate_numerator_minor = 67, rate_denominator = 10 },
]
For USD $2.50 per million input tokens, the rate is 250 cents per 1,000,000 tokens:
components = [
{ unit = "input_token", rate_numerator_minor = 250, rate_denominator = 1000000 },
]
Gongbu computes an exact rational estimate and rounds it up once to micro-units (10⁻⁶ of the currency) for the authorization amount. Settlement preserves the final exact provider cost with this complete frozen pricing snapshot and converts it to budget micro-units once, as defined in precise external cost and budget conversion. Verify both the provider's unit and whether quoted prices include every billable component.
Matching and ambiguity rules#
- Every selectable live target needs a pricing rule for its exact provider/model, workload, and request selector.
- Rule IDs are globally unique within the catalog.
- Provider/model/workload/selector combinations are unambiguous.
- Selectors that include
image_sizeprice only images: oneimagecomponent or megapixel components, plus at most oneinput_imageand oneinput_megapixelcomponent. - Component units cannot repeat within one rule.
- Rates cannot be negative and denominators must be positive.
- Unsupported currencies, units, selectors, or old flat pricing shapes are rejected.
After changing providers.toml#
Run doctor and render. Review the changed source files, target versions, catalog version, and affected components. Stop the whole managed stack before activating the reviewed generation. Rendering or activation never contacts a provider or performs provider work; later execution through an active, execution-enabled live target may incur charges.