{
    "$schema": "./provider-catalog.schema.json",
    "id": "cerebras",
    "displayName": "Cerebras",
    "aliases": [],
    "tier": 2,
    "wire": {
        "baseURL": "https://api.cerebras.ai/v1"
    },
    "models": {
        "default": "gpt-oss-120b",
        "fallbacks": ["gpt-oss-120b"],
        "defaultContextWindow": 65536,
        "defaultMaxOutputTokens": 8192,
        "catalog": {
            "gpt-oss-120b": {
                "contextWindow": 65536,
                "pricingPerMTok": {
                    "input": 0.35,
                    "output": 0.75
                },
                "vision": false,
                "status": "production",
                "description": "Recommended - OpenAI GPT-OSS 120B (open-weight); wafer-scale speed"
            },
            "gemma-4-31b": {
                "contextWindow": 65536,
                "pricingPerMTok": {
                    "input": 0.99,
                    "output": 1.49
                },
                "vision": false,
                "status": "retired",
                "description": "Retired 2026-09 — gone from the authenticated /v1/models roster; the nightly vision test has failed on it since 2026-09-10"
            }
        },
        "topModels": ["gpt-oss-120b"]
    },
    "capabilities": {
        "text": true,
        "streaming": true,
        "tools": true,
        "toolsWithStreaming": true,
        "structuredOutput": true,
        "structuredOutputWithTools": false,
        "embeddings": false,
        "thinking": false
    },
    "errorRules": [
        {
            "status": 401,
            "pattern": "wrong_api_key|Wrong API Key|invalid_api_key",
            "class": "authentication",
            "message": "Invalid Cerebras API key. Check {apiKeyEnvVar}. Get one at https://cloud.cerebras.ai"
        }
    ],
    "setup": {
        "url": "https://cloud.cerebras.ai",
        "apiKeyFormat": null,
        "billingPolicy": "free-with-card",
        "instructions": [
            "1. Visit: https://cloud.cerebras.ai",
            "2. Sign in or create a free Cerebras account",
            "3. Create an API key under API Keys",
            "4. Set {apiKeyEnvVar} in your .env file"
        ]
    },
    "evidence": {
        "rosterVerified": {
            "date": "2026-09-28",
            "method": "authenticated GET /v1/models — roster is now gpt-oss-120b and qwen-3.8-27b; gemma-4-31b is gone, so it is retired and Cerebras has no verified vision model. qwen-3.8-27b is not added: the account answers 402 payment_required, so no chat call could verify it"
        },
        "authProbe": {
            "date": "2026-08-26",
            "status": 401,
            "code": "wrong_api_key"
        },
        "liveMatrix": {
            "date": "2026-08-30",
            "result": "Both ids answer. Vision re-tested with a valid 64x64 PNG: gemma-4-31b describes it correctly, so its vision flag is now true (it was false); gpt-oss-120b answers \"Content type 'image_url' is not supported by selected model\"."
        },
        "addedInPR": "https://github.com/juspay/neurolink/pull/1561"
    }
}
