Reports where the effective API key comes from (preference, environment, or none).
Allows or refuses the use of an API key found in the environment. Refused by default: an
environment key is only used once the user has confirmed it, and setting this back to false
stops it being used immediately, wherever it would have been used.
Fetches the models Anthropic currently offers from its
/v1/modelsendpoint, retrying transient connection failures and persisting a snapshot for offline use.Requires an API key. Returns an empty result when no key is configured. On a live-fetch failure it falls back to the cached snapshot (
fromCache: true) when one exists, and only throws when there is no cache to fall back to.