yera.cli.model_discovery.aws
AWS bedrock model discovery handler.
Symbols
AWSModelDiscovery
BaseModelDiscoveryHandler 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
AWSModelDiscovery.discover
discover() → DiscoveredModelsFetches 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
A DiscoveredModels object containing separate lists for LLMs, embeddings, and rerankers.
Raises
If the provided connection object is not an AWSConnection.