nexus-agents - v2.80.0
    Preparing search index...

    Interface ModelNotFoundFallbackOptions

    Adapters exports - Model adapters (Claude, OpenAI, Gemini, Ollama) Split from index.ts for file size compliance (Issue #285)

    interface ModelNotFoundFallbackOptions {
        cache?: AvailableModelsCache;
        registry?: ModelRegistry;
        adapterFactory?: (modelId: string) => IModelAdapter;
        onRetirement?: (info: RetirementInfo) => void;
    }
    Index

    Properties

    Process-local cache of routable models. Refreshed on a 404. Defaults to getDefaultAvailableModelsCache() — passing one explicitly is the right move for tests and for multi-cache topologies.

    registry?: ModelRegistry

    Registry used to resolve vendor/family from a model id. Defaults to global.

    adapterFactory?: (modelId: string) => IModelAdapter

    Optional adapter factory used to build a new IModelAdapter for the fallback model id. When provided, the wrapper retries through the factory's adapter. When omitted, the wrapper logs + emits a MODEL_NOT_FOUND error enriched with the suggested fallback id — the caller (orchestrator / router) is responsible for re-routing.

    onRetirement?: (info: RetirementInfo) => void

    Optional callback invoked when a retirement is detected. Use for telemetry / sticky-state updates. Failures in the callback are swallowed — the user's call is what matters.