CoAgent8 - Source API
    Preparing search index...

    Function listModels

    • Lists the models Claude Code offers, with the concrete model each alias runs, from the initialize control request of a restricted stream-json session that receives no user message: no model turn and no cost.

      Parameters

      • Optionalprobe: AdapterProbeResult

        The current probe; an unsupported version is not asked.

      • Optionalcontext: BackendReadContext

        Optional cancellation and deadline context (EXEC-001-T08d).

      Returns Promise<ModelCatalog | undefined>

      The catalog, or undefined when the CLI does not answer, is older than MIN_CLAUDE_VERSION, or reports a turn or result, which discards the run.