Liya Engine

Model Configuration

Control model selection strategy, per-intent overrides, and cost caps.

modelConfig controls which LLM models are used for inference and how cost is managed per request and session.


Schema

{
  "modelConfig": {
    "strategy": "hybrid",
    "default_model": "gpt-4o-mini",
    "premium_model": "gpt-4o",
    "tool_calling_model": "gpt-4o",
    "intent_model_overrides": {
      "mock_interview": "gpt-4o",
      "candidate_scoring": "gpt-4o"
    },
    "max_tokens_per_request": 4000,
    "max_cost_per_request": 0.10,
    "max_cost_per_session": 1.00,
    "max_cost_per_day": 100.00,
    "max_context_tokens": 4000,
    "max_session_messages": 20,
    "session_timeout_minutes": 30
  }
}

Model strategy

strategy

ValueBehaviour
hybridStandard intents use default_model; premium intents use premium_model (default)
all-miniAll intents use default_model — lowest cost
all-standardAll intents use premium_model — highest quality

Premium intents (default)

In hybrid mode, these intents use premium_model by default:

  • mock_interview
  • coaching_session
  • candidate_prescreen
  • candidate_scoring

Override the premium intent list via featureConfig.premium_intents.

intent_model_overrides

Pin a specific model to a specific intent, overriding strategy:

{
  "intent_model_overrides": {
    "resume_analysis": "gpt-4o-mini",
    "career_transition_planning": "gpt-4o"
  }
}

Cost limits

FieldDefaultDescription
max_cost_per_request$0.10Hard cap per API call — request rejected if estimated cost exceeds this
max_cost_per_session$1.00Session-level cap — new messages rejected when session cost hits this
max_cost_per_day$100.00Daily tenant-level cap
max_tokens_per_request4000Output token limit per request

Context limits

FieldDefaultDescription
max_context_tokens4000Token budget for session history injected into context
max_session_messages20Maximum messages carried in session memory
session_timeout_minutes30Session expires after this period of inactivity

BYOK and model routing

When BYOK is enabled (provider_config.mode = "byok"), model routing defers to your configured provider. The strategy, default_model, and premium_model fields still control which model names are requested — but they're sent to your provider, not Liya's. See Bring Your Own Key.

On this page