/ utils / immediateCommand.ts
immediateCommand.ts
 1  import { getFeatureValue_CACHED_MAY_BE_STALE } from '../services/analytics/growthbook.js'
 2  
 3  /**
 4   * Whether inference-config commands (/model, /fast, /effort) should execute
 5   * immediately (during a running query) rather than waiting for the current
 6   * turn to finish.
 7   *
 8   * Always enabled for ants; gated by experiment for external users.
 9   */
10  export function shouldInferenceConfigCommandBeImmediate(): boolean {
11    return (
12      process.env.USER_TYPE === 'ant' ||
13      getFeatureValue_CACHED_MAY_BE_STALE('tengu_immediate_model_command', false)
14    )
15  }