Member Junction
    Preparing search index...

    Function MapEffortLevelToOpenAIRealtime

    • Maps MJ's NORMALIZED effort level (the same ChatParams.effortLevel vocabulary the LLM drivers consume: a numeric 1–100 value, or a named level) onto OpenAI's realtime RealtimeReasoningEffort union. This is the OpenAI implementation of the OpenAIRealtimeProfile.mapEffortLevel seam — providers with a DIFFERENT effort vocabulary override the profile function rather than the protocol code.

      Numeric mapping is quintile-based across OpenAI's five levels: ≤20 → minimal, ≤40 → low, ≤60 → medium, ≤80 → high, >80 → xhigh. Named values already in the union pass through. Unmappable values return undefined (dropped with a diag log — never sent raw).

      Parameters

      • effortLevel: string

        The MJ-normalized effort level (numeric string/number 1–100 or named level).

      Returns RealtimeReasoningEffort

      The provider effort literal, or undefined when the value cannot be mapped.