yera.cli.model_discovery.anthropic

Anthropic model discovery handler.

Symbols

class AnthropicModelDiscovery — Handler for discovering available models from the Anthropic API.

AnthropicModelDiscovery

Handler for discovering available models from the Anthropic API.

This class interacts with the Anthropic SDK to fetch a real-time list of available models associated with the configured API key.

Methods

discover — Fetches the list of available models from Anthropic.

AnthropicModelDiscovery.discover

discover() → DiscoveredModels

Fetches the list of available models from Anthropic.

This method retrieves the API key from the configured environment variable, initialises an Anthropic client, and queries the API for available models. Each discovered model is then mapped to a standardized LLMConfig.

Returns

type: DiscoveredModels

A DiscoveredModels object containing the list of discovered LLMs as LLMConfig instances.

Raises

TypeError

If the provided connection object is not an AnthropicConnection.

ValueError

If the required API key environment variable is not set.