# `ReqLLM.Providers.AmazonBedrock.Meta`
[🔗](https://github.com/agentjido/req_llm/blob/main/lib/req_llm/providers/amazon_bedrock/meta.ex#L1)

Meta Llama model family support for AWS Bedrock.

Handles Meta's Llama models (Llama 3, 3.1, 3.2, 3.3, 4) on AWS Bedrock.

This module acts as a thin adapter between Bedrock's AWS-specific wrapping
and Meta's native Llama format. It delegates to `ReqLLM.Providers.Meta.Llama` for
all format conversion and response parsing.

## Native Format vs OpenAI-Compatible

Unlike most cloud providers (Azure, Google Cloud Vertex AI) and self-hosted
deployments (vLLM, Ollama) which wrap Llama in OpenAI-compatible APIs,
**AWS Bedrock uses Meta's native format** with `prompt`, `max_gen_len`,
and `generation` fields.

This is why this module delegates to `ReqLLM.Providers.Meta.Llama` rather
than the direct Meta Model API provider.

# `extract_usage`

Extracts usage metadata from the response body.

Delegates to the generic Meta provider for usage extraction.

# `format_llama_prompt`

Formats messages into Llama 3 prompt format.

Delegates to the generic Meta provider. Exposed for testing.

# `format_request`

Formats a ReqLLM context into Meta Llama request format for Bedrock.

Delegates to the generic Meta provider and returns the formatted request.

# `normalize_tool_schema`

Normalizes tool schema for Meta Llama models.

Meta Llama models on Bedrock have a bug where they return empty content arrays
when tool schemas include "additionalProperties": false. This function strips
that field recursively from the schema.

# `parse_response`

Parses Meta Llama response from Bedrock into ReqLLM format.

Delegates to the generic Meta provider for parsing.

# `parse_stream_chunk`

Parses a streaming chunk for Meta Llama models.

Each chunk contains a "generation" field with the next text segment.
Unwraps Bedrock's AWS Event Stream encoding before processing.

# `supports_converse_tool_choice?`

Returns whether this model family supports toolChoice in Bedrock Converse API.

---

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