yera.cli.model_discovery.aws

AWS bedrock model discovery handler.

Symbols

class AWSModelDiscovery — Handler for discovering foundation models from AWS Bedrock.

AWSModelDiscovery

Handler for discovering foundation models from AWS Bedrock.

This class interacts with the AWS Bedrock API to list all available foundation models, filters them for usability, and classifies them into LLMs, Embeddings, or Rerankers.

Methods

discover — Fetches and categorizes available foundation models from AWS Bedrock.

AWSModelDiscovery.discover

discover() → DiscoveredModels

Fetches and categorizes available foundation models from AWS Bedrock.

The discovery process follows these steps: 1. Initialise a Boto3 session using the provided AWS connection. 2. Retrieve the full list of foundation models from the Bedrock API. 3. Filter out legacy or non-on-demand models. 4. Classify each model into a capability type (LLM, Embedding, Reranker). 5. Build the corresponding Yera configuration objects.

Returns

type: DiscoveredModels

A DiscoveredModels object containing separate lists for LLMs, embeddings, and rerankers.

Raises

TypeError

If the provided connection object is not an AWSConnection.