Member Junction
    Preparing search index...

    Interface LLMToolConformanceSuiteConfig

    interface LLMToolConformanceSuiteConfig {
        CreateLLM: () => BaseLLM;
        OrdinaryFinishReason?: string;
        ProviderName: string;
        ScriptTextResponse?: (text: string) => void;
        ScriptToolCallResponse?: (calls: ScriptedToolCall[], text?: string) => void;
        SupportsTools: boolean;
    }
    Index

    Properties

    CreateLLM: () => BaseLLM

    Construct a fresh driver instance wired to the scriptable vendor mock. Called in beforeEach, so every test gets a clean instance.

    OrdinaryFinishReason?: string

    The finish_reason this driver reports on an ordinary (non-tool) turn — 'stop' for the OpenAI family, 'completed' for Anthropic, 'STOP' for Gemini.

    That these differ at all is a known gap: finish_reason is typed as a bare string and has never been normalized across drivers. Native tool calling adds the FIRST normalized value ('tool_calls'); the rest is captured here rather than papered over, so the inconsistency is visible in one place.

    Tracked in MemberJunction/MJ#4335. When that lands, every driver reports the same value here and this knob should be deleted rather than updated.

    ProviderName: string

    Human-readable provider name, used in describe() labels.

    ScriptTextResponse?: (text: string) => void

    Program the vendor mock: the next call returns an ordinary text answer, no tool calls.

    ScriptToolCallResponse?: (calls: ScriptedToolCall[], text?: string) => void

    Program the vendor mock: the next call returns these tool calls, plus text when the provider is also emitting prose on the same turn. Required when SupportsTools is true.

    The mock must render the calls the way its SDK really does — OpenAI's JSON-STRING arguments, Anthropic's parsed input, Gemini's functionCall parts — because turning that back into parsed arguments is exactly what the suite is checking.

    SupportsTools: boolean

    Whether the driver implements the tool mapping (asserted against SupportsTools).