> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Language Model (genai.model.language)

> The language family's model provider: the model, a credential per vendor or gateway, and the settings language models share.

Each family of models has its own provider component, `genai.model.<family>`, built on one shared core: `alias`,
`model`, `allowed_models`, `vendors` and `vendor_settings` mean the same in every family, and a family adds its own
settings. `genai.model.language`, the language family's, is the one there is: messages in, a message out. It names a
default `model` (`<vendor>/<model>`), a `vendors` list holding one credential per vendor or gateway it may call, and
the settings language models share. `genai.chat` and `genai.agent.basic` reach it through their model ports.

A call picks its model first. The model's vendor names an entry of the
[vendor registry](https://docs.blobhub.io/blob-types/workflow/workflows/vendors-and-gateways.md), which gives the dialect the call speaks and the
endpoint, and an entry of `vendors`, which gives the credential and, where it holds one, an endpoint of its own:

```mermaid theme={null}
flowchart TD
    alias["Run's entry for the alias"] -->|first| id
    star["Run's entry for *"] -->|then| id
    port["The model port"] -->|otherwise| id
    id["Model id #lt;vendor#gt;/#lt;model#gt;"] --> registry["Registry entry: dialect, endpoint"]
    id --> entry["Entry in vendors: credential, endpoint"]
    registry --> request["The call"]
    entry --> request
    request --> vendor["A vendor's API: OpenAI, Anthropic, Gemini"]
    request --> gateway["A gateway's API: OpenRouter, Databricks, Vercel"]
    request --> own["Your own server: openai_compatible"]
```

## Ports

The ports below are data inputs, which the editor shows in three groups, **Model**, **Vendors** and **Settings**. A
`genai.model.language` has no flow ports: it is connected to the model port of each component it serves.

| Route | Group | Value | Notes |
| - | - | - | - |
| `alias` | Model | `text` | Names the component for a run's input. Unique among the definition's model providers and `data` components, because a run's inputs address both by alias. |
| `model` | Model | `text` | The model the component runs when a run names none, as `<vendor>/<model>`. Required. The editor's picker lists the catalog's language models. |
| `allowed_models` | Model | `list` of `text` | The models a run may name: exact ids or `<vendor>/*`. Empty allows every model. |
| `vendors` | Vendors | `list` of `object`, keyed by `vendor` | One entry per vendor or gateway the component may call, with the fields below. Required. |
| `max_output_tokens` | Settings | `integer`, from 1 | |
| `temperature` | Settings | `float`, from 0 to 2 | 2 is the widest OpenAI, Anthropic and Gemini accept. |
| `top_p` | Settings | `float`, from 0 to 1 | |
| `top_k` | Settings | `integer`, from 1 | |
| `stop_sequences` | Settings | `list` of `text` | |
| `seed` | Settings | `integer` | |
| `frequency_penalty` | Settings | `float`, from -2 to 2 | |
| `presence_penalty` | Settings | `float`, from -2 to 2 | |
| `reasoning_effort` | Settings | `choice`: `low`, `medium`, `high` | |
| `prompt_cache` | Settings | `choice`: `off`, `on` | `on` uses the vendor's prompt cache for the call; with `off`, BlobHub adds no caching cost of its own, though an OpenAI model of GPT-5.6 or later that the catalog does not list keeps OpenAI's paid default. Unset means `off`, unlike the other settings, whose unset value leaves the vendor's default. See [Prompt Caching and Usage](https://docs.blobhub.io/blob-types/workflow/workflows/prompt-caching-and-usage.md). |
| `reasoning_summary` | Settings | `choice`: `none`, `auto` | `auto` asks the model for a summary of its reasoning, written as the text of the answer's `reasoning` blocks. Unset means `none`. |
| `vendor_settings` | Settings | `object` of any shape | `{"<vendor>": {…}}`: extra request fields for one vendor or gateway. |

`vendors` is keyed by `vendor`, so no two entries name the same vendor. Each entry's fields, by their labels in the
editor:

| Field | Label | Value | Notes |
| - | - | - | - |
| `vendor` | Vendor | `choice` of the registry's entries that serve language models: `anthropic`, `databricks`, `gemini`, `openai`, `openai_compatible`, `openrouter`, `vercel` | Required. The editor shows each by its registry label. |
| `credential` | Credential | the alias of an `api_key` credential | Required. |
| `base_url` | Endpoint | `text` | Replaces the registry entry's endpoint. Required for `databricks` and `openai_compatible`, whose entries have none; optional for the others. |

Stored in a definition, the port holds a `list` value whose items are plain data, a credential by its alias:

```json theme={null}
{"type": "list", "list": [
  {"vendor": "anthropic", "credential": "anthropic-key"},
  {"vendor": "openai_compatible", "credential": "openai-key", "base_url": "https://llm.example.com/v1"}
]}
```

## Model ids

A model id is `<vendor>/<model>`, split at the first `/`: `anthropic/claude-sonnet-5-5` is the model
`claude-sonnet-5-5` of the vendor `anthropic`. The vendor is a registry entry's name and names the API that is called,
not the model's maker. A gateway's ids therefore carry the gateway first, then the gateway's own name for the model:
`openrouter/anthropic/claude-fable-5.2` is Claude Fable 5.2 through OpenRouter, and `databricks/system.ai.<model>` a
model a Databricks workspace serves. A model on a server of your own speaking OpenAI's Chat Completions API is an
`openai_compatible` id however it was made. An id without a vendor and a model, or whose vendor is no registry entry,
is an error in the `model` port, and a run naming one is refused.

## The catalog

The catalog lists the language models BlobHub knows: the modalities each takes and gives, what it can do, the
settings it accepts, its context window and its maximum output, in tokens. It is served with the workflow and
playground manifests, so the editor's model picker offers the same models. The modalities are `text`, `image`,
`document`, `audio` and `video` ([Modalities and Media](https://docs.blobhub.io/blob-types/workflow/workflows/modalities-and-media.md)); the
capabilities are `tools` ([Tool Calling](https://docs.blobhub.io/blob-types/workflow/workflows/tool-calling.md)), `structured_output` and
`reasoning`.

| Model | Label | Inputs | Outputs |
| - | - | - | - |
| `anthropic/claude-fable-5-2` | Claude Fable 5.2 | `text`, `image`, `document` | `text` |
| `anthropic/claude-opus-5-5` | Claude Opus 5.5 | `text`, `image`, `document` | `text` |
| `anthropic/claude-sonnet-5-5` | Claude Sonnet 5.5 | `text`, `image`, `document` | `text` |
| `anthropic/claude-haiku-5-5` | Claude Haiku 5.5 | `text`, `image`, `document` | `text` |
| `openai/gpt-6-astra` | GPT-6 Astra | `text`, `image`, `document` | `text`, `image` |
| `openai/gpt-6-luna` | GPT-6 Luna | `text`, `image`, `document` | `text`, `image` |
| `gemini/gemini-3.1-pro-preview` | Gemini 3.1 Pro (preview) | `text`, `image`, `document`, `audio`, `video` | `text` |
| `gemini/gemini-3-flash-preview` | Gemini 3 Flash (preview) | `text`, `image`, `document`, `audio`, `video` | `text` |
| `gemini/gemini-3.1-flash-lite` | Gemini 3.1 Flash-Lite | `text`, `image`, `document`, `audio`, `video` | `text` |
| `gemini/gemini-3-pro-image` | Gemini 3 Pro Image | `text`, `image` | `text`, `image` |
| `openrouter/openai/gpt-6-astra` | GPT-6 Astra (OpenRouter) | `text`, `image`, `document` | `text`, `image` |
| `openrouter/anthropic/claude-fable-5.2` | Claude Fable 5.2 (OpenRouter) | `text`, `image`, `document` | `text` |
| `openrouter/google/gemini-3-pro-image` | Gemini 3 Pro Image | `text`, `image` | `text`, `image` |
| `openrouter/google/gemini-3.1-pro-preview` | Gemini 3.1 Pro (preview, OpenRouter) | `text`, `image`, `document`, `audio`, `video` | `text` |
| `vercel/google/gemini-3.1-pro-preview` | Gemini 3.1 Pro (preview, Vercel) | `text`, `image`, `document`, `audio`, `video` | `text` |

The same models, by what they can do and how much they take and give:

| Model | Capabilities | Context window | Max output tokens |
| - | - | - | - |
| `anthropic/claude-fable-5-2` | `tools`, `structured_output`, `reasoning` | 1,000,000 | 128,000 |
| `anthropic/claude-opus-5-5` | `tools`, `structured_output`, `reasoning` | 1,000,000 | 128,000 |
| `anthropic/claude-sonnet-5-5` | `tools`, `structured_output`, `reasoning` | 1,000,000 | 128,000 |
| `anthropic/claude-haiku-5-5` | `tools`, `structured_output`, `reasoning` | 1,000,000 | 128,000 |
| `openai/gpt-6-astra` | `tools`, `structured_output`, `reasoning` | 922,000 | 128,000 |
| `openai/gpt-6-luna` | `tools`, `structured_output`, `reasoning` | 922,000 | 128,000 |
| `gemini/gemini-3.1-pro-preview` | `tools`, `structured_output`, `reasoning` | 1,048,576 | 65,536 |
| `gemini/gemini-3-flash-preview` | `tools`, `structured_output`, `reasoning` | 1,048,576 | 65,536 |
| `gemini/gemini-3.1-flash-lite` | `tools`, `structured_output`, `reasoning` | 1,048,576 | 65,536 |
| `gemini/gemini-3-pro-image` | `reasoning` | 65,536 | 32,768 |
| `openrouter/openai/gpt-6-astra` | `tools`, `structured_output`, `reasoning` | 922,000 | 128,000 |
| `openrouter/anthropic/claude-fable-5.2` | `tools`, `structured_output`, `reasoning` | 1,000,000 | 128,000 |
| `openrouter/google/gemini-3-pro-image` | `reasoning` | 65,536 | 32,768 |
| `openrouter/google/gemini-3.1-pro-preview` | `tools`, `structured_output`, `reasoning` | 1,048,576 | 65,536 |
| `vercel/google/gemini-3.1-pro-preview` | `tools`, `structured_output`, `reasoning` | 1,000,000 | 64,000 |

The OpenAI models' figure is OpenAI's maximum input, 922,000 tokens, not its 1,050,000-token context window:
BlobHub's [window guard](https://docs.blobhub.io/blob-types/workflow/workflows/component-genai-chat.md#the-window-guard) reserves only the
request's own `max_output_tokens`, none when it is unset, so it has to stop input at the figure OpenAI accepts. The
`openrouter` row takes the same figure from its native model.

The same models, by the settings they accept:

| Model | Settings accepted |
| - | - |
| `anthropic/claude-fable-5-2` | `max_output_tokens`, `stop_sequences`, `reasoning_effort` |
| `anthropic/claude-opus-5-5` | `max_output_tokens`, `stop_sequences`, `reasoning_effort` |
| `anthropic/claude-sonnet-5-5` | `max_output_tokens`, `stop_sequences`, `reasoning_effort` |
| `anthropic/claude-haiku-5-5` | `max_output_tokens`, `stop_sequences`, `reasoning_effort` |
| `openai/gpt-6-astra` | `max_output_tokens`, `temperature`, `top_p`, `reasoning_effort` |
| `openai/gpt-6-luna` | `max_output_tokens`, `temperature`, `top_p`, `reasoning_effort` |
| `gemini/gemini-3.1-pro-preview` | `max_output_tokens`, `temperature`, `top_p`, `top_k`, `stop_sequences`, `seed`, `reasoning_effort` |
| `gemini/gemini-3-flash-preview` | `max_output_tokens`, `temperature`, `top_p`, `top_k`, `stop_sequences`, `seed`, `reasoning_effort` |
| `gemini/gemini-3.1-flash-lite` | `max_output_tokens`, `temperature`, `top_p`, `top_k`, `stop_sequences`, `seed`, `reasoning_effort` |
| `gemini/gemini-3-pro-image` | `max_output_tokens`, `temperature`, `top_p`, `top_k`, `stop_sequences`, `seed` |
| `openrouter/openai/gpt-6-astra` | `max_output_tokens`, `temperature`, `top_p`, `reasoning_effort` |
| `openrouter/anthropic/claude-fable-5.2` | `max_output_tokens`, `stop_sequences`, `reasoning_effort` |
| `openrouter/google/gemini-3-pro-image` | `max_output_tokens`, `temperature`, `top_p`, `stop_sequences`, `seed` |
| `openrouter/google/gemini-3.1-pro-preview` | `max_output_tokens`, `temperature`, `top_p`, `stop_sequences`, `seed`, `reasoning_effort` |
| `vercel/google/gemini-3.1-pro-preview` | `max_output_tokens`, `temperature`, `top_p`, `stop_sequences`, `seed`, `reasoning_effort` |

A gateway's id accepts the settings its model accepts from its own vendor, less `top_k`, which Chat Completions lacks.
Four catalog models refuse a forced tool call: `anthropic/claude-fable-5-2`, `anthropic/claude-opus-5-5`,
`anthropic/claude-sonnet-5-5` and `openrouter/anthropic/claude-fable-5.2`. A `genai.chat` whose `tool_choice` is
`required` sends them `auto` instead, with the warning `tool_choice "required" is not supported by <id>: sent "auto"`.
An id the catalog does not list gets `tool_choice` as given, and the vendor decides at the call.

* **A model the catalog does not list is accepted.** `check_definition` warns about one in the `model` port, and a
  run naming one posts a warning on the provider's node,
  `anthropic/x is not in the catalog: its capabilities were not checked and every setting is sent`. Its capabilities,
  inputs and outputs are not checked, so the vendor decides at the call, and every setting its dialect has a field for
  is sent. A gateway serves many more models than the catalog lists, and those are unknown models, as is every
  Databricks id, since each workspace names its own.
* **A consumer needs what it uses.** A `genai.chat` holding `tools` needs a model that does `tools`, and one whose
  `output_modalities` holds `image` needs a model whose outputs hold `image`. A catalog model without what its
  consumers need is an error in the `model` port, and a run naming one for that provider by its alias is refused;
  through `*` that provider keeps its own model, with a warning, unless no provider left to `*` can run it, which
  refuses the run.
* **The catalog changes only with a platform release.**

## Settings

The nine shared settings are `max_output_tokens`, `temperature`, `top_p`, `top_k`, `stop_sequences`, `seed`,
`frequency_penalty`, `presence_penalty` and `reasoning_effort`. A value goes to the vendor unchanged, and a setting left
unset is not sent, so the vendor's own default applies, except that an `anthropic_messages` call with no
`max_output_tokens` sends 16,000, the API requiring a value. The editor seeds a setting with a default, but only a value
the definition stores is sent. Each setting a run gives replaces the provider's for that run; the others stay. A run's
settings are checked against the same ranges, so an out-of-range value refuses the run (`invalid_input_data`).

The language family adds two settings, `prompt_cache` and `reasoning_summary`. They are not per model: every dialect
handles them, they are never left out, and a run may give them too. Unlike the shared settings, each has a value when
unset: `prompt_cache` means `off` and `reasoning_summary` means `none`.

Each setting becomes a field of the request in the dialect of the model's registry entry: `openai_responses` for
OpenAI, `anthropic_messages` for Anthropic, `gemini_generate` for Gemini, and `openai_chat` for the gateways and
`openai_compatible` ([Vendors and Gateways](https://docs.blobhub.io/blob-types/workflow/workflows/vendors-and-gateways.md)).

| Setting | `openai_responses` | `openai_chat` |
| - | - | - |
| `max_output_tokens` | `max_output_tokens` | `max_completion_tokens` |
| `temperature`, `top_p` | `temperature`, `top_p` | `temperature`, `top_p` |
| `top_k` | — | — |
| `stop_sequences` | — | `stop` |
| `seed` | — | `seed` |
| `frequency_penalty`, `presence_penalty` | — | `frequency_penalty`, `presence_penalty` |
| `reasoning_effort` | `reasoning.effort` | `reasoning_effort`; through `openrouter` and `vercel`, `reasoning.effort` in the extra body, never top-level |
| `reasoning_summary`: `auto` | `reasoning.summary: "auto"` | `reasoning: {"summary": "auto"}`, in the extra body; through `openrouter` and `vercel`, `reasoning.enabled: true` and no `summary`, in one object with any effort (`{"effort": …, "enabled": true}`) |
| `reasoning_summary`: `none` | nothing | nothing; through `openrouter` with a `reasoning_effort`, the effort alone turns reasoning on, so the run still reasons |
| `prompt_cache`: `on` | nothing: OpenAI caches on its own | the marks the entry's `options.cache` places: none for `openai_compatible` and `vercel` |
| `prompt_cache`: `off` | `prompt_cache_options: {"mode": "explicit"}` for a catalog model of GPT-5.6 or later, which turns its paid caching off; otherwise nothing | nothing; through `openrouter`, the same field as `openai_responses` sends, for the same models |

The same settings in the other two dialects:

| Setting | `anthropic_messages` | `gemini_generate` |
| - | - | - |
| `max_output_tokens` | `max_tokens`; unset sends 16,000 | `max_output_tokens` |
| `temperature`, `top_p` | `temperature`, `top_p` | `temperature`, `top_p` |
| `top_k` | `top_k` | `top_k` |
| `stop_sequences` | `stop_sequences` | `stop_sequences` |
| `seed` | — | `seed` |
| `frequency_penalty`, `presence_penalty` | — | `frequency_penalty`, `presence_penalty` |
| `reasoning_effort` | `output_config={"effort": v}` | `thinking_config.thinking_level = v` |
| `reasoning_summary`: `auto` | `thinking: {"type": "adaptive", "display": "summarized"}`, for a catalog model with `reasoning` or an unknown one | `thinking_config.include_thoughts: true` |
| `reasoning_summary`: `none` | no `thinking` | nothing |
| `prompt_cache`: `on` | top-level `cache_control: {"type": "ephemeral"}` | nothing: Gemini caches on its own |
| `prompt_cache`: `off` | nothing | nothing |

A setting the dialect has no field for, or that the catalog model does not accept, is left out of the call, and the
provider posts one warning naming each setting left out and why:

```text theme={null}
Settings left out: temperature (anthropic/claude-opus-5-5 does not accept it), seed (anthropic has no such setting)
```

On OpenAI's Responses API, `seed`, `stop_sequences`, `frequency_penalty`, `presence_penalty` and `top_k` are left out.

For a model the catalog does not know, only a setting its dialect has no field for is left out. `prompt_cache` `on`
through an entry that places no cache marks posts its own warning,
`<vendor> places no cache marks; prompt_cache on has no effect`.

`vendor_settings` holds extra request fields per vendor or gateway, keyed by its registry entry. Only the selected
vendor's block is sent, as the SDK's extra body (`extra_body` for `openai_responses`, `openai_chat` and
`anthropic_messages`, `http_options.extra_body` in Gemini's config), so a field the SDK does not know still reaches
the API. On `openai_chat` it goes over the registry entry's own request defaults, and a `reasoning` key under
`openrouter` or `vercel` replaces the whole reasoning object above. On `openai_responses`, the key
`image_generation` configures the image tool instead
([Modalities and Media](https://docs.blobhub.io/blob-types/workflow/workflows/modalities-and-media.md)).

## Vendors and credentials

`vendors` holds one entry per registry entry the provider may call: a vendor, a gateway, or `openai_compatible` for a
server of your own ([Vendors and Gateways](https://docs.blobhub.io/blob-types/workflow/workflows/vendors-and-gateways.md)). An entry's
`credential` is the alias of an `api_key` credential, resolved against whoever started the run, as every credential is
([How a run uses one](https://docs.blobhub.io/general/credentials.md#how-a-run-uses-one)). The provider loads only the credential of the selected
model's vendor, so a vendor it does not call needs no credential where it runs: a provider listing three vendors runs
where only one of those credentials exists, as long as the model it runs is that vendor's.

A credential's type says how a service authenticates, not which service it is, so any `api_key` credential fits any
entry; the registry entry says where the key goes. A key in the wrong entry fails at the first call with the vendor's
own error.

`base_url`, the **Endpoint**, replaces the registry entry's endpoint for this provider's calls, for a server speaking
the same dialect. It is required where the entry has none: `databricks` takes the workspace's endpoint,
`https://<workspace>/ai-gateway/mlflow/v1`, and `openai_compatible` any server speaking OpenAI's Chat Completions API,
such as a company proxy or a model server of your own. A model served there is usually not in the catalog, and is
treated as any unknown model.

`allowed_models` holds the models a run may name: exact ids, or `<vendor>/*` for every model of a vendor or gateway.
Empty allows every model.

## Checks

`check_definition` reports these on the component. Prepare runs it before every run, and a definition that fails it
ends the run with `flow.error` `Workflow definition check failed`.

Errors:

* `model` is not `<vendor>/<model>`, or its vendor is no registry entry.
* `vendors` has no entry for the vendor of the `model` port's model.
* A `vendors` entry without a vendor or a credential, an unknown vendor, or two entries for one vendor: a `list` or
  `object` port whose value does not fit its shape is an error, as on every component.
* A `vendors` entry whose vendor serves no language models: `vendors[<i>].vendor: <id> serves no language models`.
* A `vendors` entry whose registry entry has no endpoint, and that gives none of its own:
  `vendors[<i>].base_url: databricks needs its own endpoint`.
* A `base_url` that does not start with `http://` or `https://`.
* An `allowed_models` entry that is neither an id nor `<vendor>/*`.
* An `alias` that another model provider or a `data` component of the definition also holds.
* A catalog model in the `model` port that lacks a capability or an output its consumers need:
  `model: <id> does not do tools, which its consumers need`, or `model: <id> gives no image, which <consumer> asks for`.

Warnings:

* The `model` port's model is not in the catalog.
* An exact id in `allowed_models` lacks a capability the consumers need.
* `vendor_settings` names an unknown vendor.
* A setting port holds a value that the `model` port's catalog model does not accept:
  `<setting> is not sent to <id>: it does not accept it.`
* An `allowed_models` entry's vendor has no `vendors` entry:
  `Allowed model <entry> has no vendors entry for <vendor>: a run naming it is refused with invalid_model.`

## When the call fails

A failed call posts a `component.error` event, and the component the provider serves takes its `failure` route. A
call fails when:

* the vendor's credential alias names no credential where the run runs: `"<alias>" credential alias not found`;
* the vendor or gateway answers with an error, such as for an unknown model or a value it refuses: its own text reaches
  the event unchanged;
* the call times out, or cannot connect after its one retry;
* a file block names a file the call cannot send, checked before the call: a content type that is no modality,
  `unsupported_media: <name> (<content type>) is not an image, a PDF, audio or video`; a modality the catalog model
  does not take, `unsupported_media: <id> does not take audio (<name>)`; or one the dialect cannot carry through its
  registry entry, `unsupported_media: anthropic cannot send audio (<name>)`
  ([Modalities and Media](https://docs.blobhub.io/blob-types/workflow/workflows/modalities-and-media.md));
* a file block names no file of the session: `file_not_found: "<alias>" is not a file in this session`;
* the consumer asks for images from a dialect that gives none, before the call:
  `output_modalities: anthropic gives no images`;
* a generated image is over the session file limit,
  `file_too_large: image <n> of the answer is <size> bytes, over the 4 MiB session file limit`, or the session's
  object limit refuses it, with that limit's own message;
* on `gemini_generate`, a tool result answers no tool call the history holds:
  `tool_result <id> answers no call in the history`.

**A refusal is an answer.** A vendor's refusal, such as Anthropic's `refusal` stop reason, a content filter or Gemini's
blocked prompt, does not fail the call: whatever content arrived is written as the answer, its `metadata.finish` is
`refused`, the provider posts a `component.warning` naming the vendor's category, and the call ends on `success`.

**An empty answer at the output cap fails.** An answer that stopped at `max_output_tokens` (`finish` `length`) holding
only `reasoning` blocks and blank text posts the call's `component.output`, with its usage, then the
`component.error` `<model> used all of its <n> output tokens without writing a reply. Raise max_output_tokens, or lower
reasoning_effort or the thinking budget.` (`code` `empty_at_output_cap`), and takes `failure`. One with
text, `json`, a tool call or an image in it is the answer, after the `component.warning` `The reply was cut at the
output cap: <model> used all of its <n> output tokens. Raise max_output_tokens for a complete reply.` (`code`
`cut_at_output_cap`). See
[An answer at the output cap](https://docs.blobhub.io/blob-types/workflow/workflows/component-genai-chat.md#an-answer-at-the-output-cap).

**A stopped execution writes nothing.** When the execution is stopped while the answer streams, the provider posts the
`component.warning` `The execution is stopping: the answer was discarded and nothing was written.` and takes its
`failure` route ([Streaming](https://docs.blobhub.io/blob-types/workflow/workflows/streaming.md)).

A call is retried once, on a 502 or 503, or on a connection refused before the request was sent. It is never retried
on a timeout or on a connection broken after the request was sent, which could bill the call twice. Every call
streams, and a vendor's error status arrives before the stream's first event, so the rule holds for a stream too: a
stream broken in the middle of an answer is never retried.

## With `logic.code`

A `genai.model.language` has no credential port: its credentials sit inside its `vendors` list. Wired to a
[`logic.code`](https://docs.blobhub.io/blob-types/workflow/workflows/component-code), it hands the code no credential, and
`get_provider_credential` finds none on it. Code that calls a vendor itself gets the key from a
`logic.generic_provider` holding the credential.

## Choosing the model per run

A run can name the model each `genai.model.language` calls, and replace the settings it gives for that run (the others
stay), with an `input_data` entry of type `genai.model.language` that addresses one provider by its alias, or, by `*`,
every provider of that type no entry names by alias. A run holds at most one `*` per family.
[Choosing a Model per Run](https://docs.blobhub.io/blob-types/workflow/workflows/choosing-a-model.md) covers the entry, what refuses it, and the
SDK's and the CLI's options for it.

## Moving from the per-vendor chat providers

The language model provider (`genai.model.language` today) replaced the three per-vendor chat providers,
`genai.chat.openai`, `genai.chat.anthropic` and `genai.chat.gemini`, and the platform's migration rewrote the stored
definitions and credentials that used them:

* Each per-vendor provider became a language model provider with the model `<vendor>/<model>`, a `vendors` entry
  holding its credential alias and, when it was not the vendor's own, its endpoint, and its stored settings. A migrated
  flow sends what it sent before: Anthropic's implicit `max_tokens` of 1024 was written out, and an Anthropic
  provider's temperature was halved, as the old provider did on every call.
* A setting stored on a chat component overrode its provider's for that component alone, so a provider shared by
  chat components that overrode different settings was copied, one per component.
* `response_format` and `response_schema` held on an OpenAI or Gemini provider moved to the chat components it served.
* `genai.chat`'s `chat` route became `model`, and the basic agent's `generic_chat`, `planning_chat`, `tool_use_chat`,
  `tool_response_chat` and `response_chat` routes became `generic_model`, `planning_model`, `tool_use_model`,
  `tool_response_model` and `response_model`.
* `providers`, the per-message override, was removed from every message a definition holds. Messages stored in
  session objects and thread items keep it, and nothing reads it.
* Credentials of the types `openai`, `anthropic`, `gemini`, `pinecone`, `firecrawl` and `tavily` became `api_key`.

A definition the migration could not rewrite, such as one in which a `logic.code` read a per-vendor provider's
credential, was left unchanged for a person to fix; such code is rewired to a `logic.generic_provider`. Execution
snapshots are history and keep the retired types, so the debugger still draws an old run's provider under its old
name.

**A local copy** pulled before the migration still holds the retired types: pull it again before the next deploy.
`blobhub workflow deploy` uploads a changed definition before it checks it, so deploying an old copy writes the
retired types back to the revision. The check then fails with ``Component type `genai.chat.openai` is not supported``,
and every run of the definition ends with `flow.error` `Workflow definition check failed`.

A per-message override has no successor: name the model per run instead
([Choosing a Model per Run](https://docs.blobhub.io/blob-types/workflow/workflows/choosing-a-model.md)).

The provider has been renamed since, and stored definitions migrated again: see Migrating to Threads and Components,
[Language models](https://docs.blobhub.io/blob-types/workflow/workflows/migrating-to-threads-and-components.md#language-models).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.