MAIDR JavaScript API
    Preparing search index...
    • Probes an LLM credential as the user types it.

      This lives in the state layer rather than in the settings dialog because a network side effect is not a component's to own — see rules/ui.md. It is the sibling of useOllamaModels, which reaches the same service for the same reason.

      The debounce only spaces out request starts; it cannot cancel a request already in flight, so a superseded cycle (a newer keystroke, a provider switch, or unmount) discards its own response. A slow early probe can therefore never overwrite the state of a newer one.

      Parameters

      • modelKey: Llm

        Which provider the credential belongs to

      • credential: string

        The API key, or the server URL for Ollama

      • enabled: boolean

        Whether the provider is switched on; probes are skipped when it is not

      Returns CredentialProbe

      What is currently known about the credential