Class GatewayProviderManager

The provider-manager calls the GMI, MetapromptExecutor and LLMUtilityAI make (getProvider, getDefaultProvider, getProviderForModel, getModelInfo), answered from the hop that serves the turn. The GMI sets the resolution before it builds each prompt. Metaprompt and utility calls have no fallback of their own in this increment: on a fallback hop a call that names the primary's provider or model finds nothing, which the caller reports. A turn's budget, when it has one, bounds these calls too (the constructor's budgetOf), and the budget of the turn that queued a metaprompt bounds that metaprompt's calls whenever they run (GatewayProviderManager.forQueuedWork).

Implements

  • GmiProviderManagerCalls

Constructors

Methods

  • This manager with the budget of the turn in progress bound to it: the manager a metaprompt batch or a self-reflection cycle queued now makes its calls through, so they spend inside the budget of the turn that queued them, whenever they run (a later turn may be in progress by then). It answers from this manager's hop as it is when each call is made.

    Returns AIModelProviderManager

  • The serving hop's provider when providerId names it; otherwise undefined.

    Parameters

    • providerId: string

    Returns undefined | IProvider

  • The serving hop's provider when modelId is the hop's model; otherwise undefined.

    Parameters

    • modelId: string

    Returns undefined | IProvider

  • Model info from the serving hop's manager, for the hop's provider unless providerId names another.

    Parameters

    • modelId: string
    • Optional providerId: string

    Returns Promise<undefined | ModelInfo>

Properties

isInitialized: true = true

Present for code that checks a manager's readiness.