# `LlmCall.Media.Dialect.Adapter`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/media/dialect/adapter.ex#L1)

`use` for a media adapter.

Injects the behaviour, the canonical aliases, the codec's name and modality,
and the shared `validate_request/2` pipeline:

    use LlmCall.Media.Dialect.Adapter, codec: :openai_images, modality: :image

The codec supplies `info/0`, `capabilities/2`, `encode_submit/2`,
`decode_submit/2`, `validate_params/1`, `validate_references/1`, and
`validate_provider_options/2`.

`namespaces:` names the `provider_options` namespaces this codec reads. It is
required: a namespace outside the list is a validation error, so a typo cannot
silently drop the caller's options.

`model_fun:` replaces the model check for protocols that constrain the model id
itself (Gemini's predict path rejects bare ids containing `/` or `:`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
