{
  "version": 1,
  "tiers": {
    "nano": {
      "label": "GPT-5.4 nano",
      "modelId": "gpt-5.4-nano",
      "provider": "openai",
      "taskTypes": ["classification", "extraction", "ranking", "labeling", "summarization"],
      "maxContextTokens": 32000,
      "costMultiplier": 0.1
    },
    "mini": {
      "label": "GPT-5.4 mini",
      "modelId": "gpt-5.4-mini",
      "provider": "openai",
      "taskTypes": ["code-edit", "test-generation", "review", "tool-use", "debugging"],
      "maxContextTokens": 200000,
      "costMultiplier": 0.4
    },
    "bulkCloud": {
      "label": "Bulk cloud cost saver (Qwen3.8-Max class)",
      "modelId": "qwen3.8-max",
      "provider": "openai-compatible",
      "taskTypes": ["bulk-generation", "batch-processing", "high-output-coding", "content-generation", "bulk-automation"],
      "maxContextTokens": 1000000,
      "costMultiplier": 0.25,
      "pricingUsdPerMTok": { "input": 2.0, "output": 6.0 },
      "endpoint": {
        "baseUrlEnv": "THUMBGATE_BULK_CLOUD_BASE_URL",
        "apiKeyEnv": "THUMBGATE_BULK_CLOUD_API_KEY"
      },
      "budgetDefaults": {
        "tokenCap": 2000000,
        "requireReason": false
      },
      "notes": "Cost-saver cloud tier for steady high-output workloads, modeled on Alibaba Model Studio token-plan economics (Qwen3.8-Max ~$2/M input, ~$6/M output vs frontier ~$15/M output). Any OpenAI-compatible endpoint works: set THUMBGATE_BULK_CLOUD_BASE_URL and THUMBGATE_BULK_CLOUD_API_KEY. The tier is inert until both are configured; routing a bulk task without them raises a clear error naming the missing variables."
    },
    "frontier": {
      "label": "GPT-5.5",
      "modelId": "gpt-5.5",
      "provider": "openai",
      "taskTypes": ["architecture", "cross-file", "complex-debugging", "large-context"],
      "maxContextTokens": 1000000,
      "costMultiplier": 1.0,
      "budgetDefaults": {
        "tokenCap": 500000,
        "requireReason": true
      }
    },
    "localFrontier": {
      "label": "Configured local frontier",
      "modelId": null,
      "provider": "openai-compatible",
      "taskTypes": [],
      "maxContextTokens": 1000000,
      "costMultiplier": 0.0,
      "budgetDefaults": {
        "tokenCap": 2000000,
        "requireReason": false
      },
      "notes": "Self-hosted open-source tier. The runtime derives the served model from THUMBGATE_MODEL_ROLE_NORMAL, THUMBGATE_LOCAL_MODEL, THUMBGATE_MODEL_ID, or THUMBGATE_LOCAL_MODEL_FAMILY. Zero marginal API cost; no token budget enforcement needed."
    }
  },
  "escalationRules": {
    "contextThreshold": 200000,
    "failureRetryThreshold": 2,
    "highRiskEscalation": true,
    "architectureTags": ["architecture", "cross-file", "multi-module", "system-design"]
  }
}
