{"record":{"id":"1e5326fde53755ea","repo":"apache/seatunnel","slug":"unknown-ai-provider-name-available-availabl","errorCode":null,"errorMessage":"Unknown AI provider '{name}'. Available: {available}","messagePattern":"Unknown AI provider '(.+?)'\\. Available: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"seatunnel-cli/seatunnel_cli/llm_provider.py","lineNumber":1458,"sourceCode":"    # 4. Auto-detect\n    if not name:\n        name = _auto_detect_provider()\n\n    if not name:\n        raise ValueError(\n            f\"No AI provider configured. Set up with one of:\\n\"\n            f\"  1. Run: seatunnel --init              (interactive setup)\\n\"\n            f\"  2. Set: export AI_PROVIDER=<{available}>\\n\"\n            f\"  3. Set provider credentials:\\n\"\n            f\"     - Anthropic: export ANTHROPIC_API_KEY=sk-ant-...\\n\"\n            f\"     - OpenAI:    export OPENAI_API_KEY=sk-...\\n\"\n            f\"     - Bedrock:   configure AWS credentials (aws configure)\"\n        )\n\n    name = name.lower().strip()\n    cls = _PROVIDERS.get(name)\n    if cls is None:\n        raise ValueError(f\"Unknown AI provider '{name}'. Available: {available}\")\n    return cls()\n","sourceCodeStart":1440,"sourceCodeEnd":1460,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-cli/seatunnel_cli/llm_provider.py#L1440-L1460","documentation":"After lowercasing and trimming the requested provider name, create_provider() looks it up in the _PROVIDERS registry. A ValueError naming the unknown provider and listing the available ones is raised when the name is not a registered key.","triggerScenarios":"Calling create_provider(name) (or setting AI_PROVIDER) with a string not present in _PROVIDERS — e.g. a typo like \"anthropic-api\", an unsupported provider like \"gemini\", or wrong casing handled upstream of the registry lookup.","commonSituations":"Typos in AI_PROVIDER values; docs or blog posts referencing providers this CLI version doesn't ship; stale config files naming a provider removed in an upgrade.","solutions":["Use one of the listed available providers exactly as printed in the error","Check AI_PROVIDER for typos and set it to a supported value (e.g. anthropic, openai, bedrock, orcarouter)","Upgrade the CLI if the provider you need was added in a newer version"],"exampleFix":"// before\nexport AI_PROVIDER=gemini\n// after\nexport AI_PROVIDER=openai","handlingStrategy":"validation","validationCode":"VALID = {\"anthropic\", \"openai\", \"bedrock\", \"orcarouter\"}\nname = os.environ.get(\"AI_PROVIDER\", \"\").lower().strip()\nassert not name or name in VALID, f\"AI_PROVIDER must be one of {sorted(VALID)}\"","typeGuard":null,"tryCatchPattern":"try:\n    provider = create_provider(name)\nexcept ValueError as e:\n    if str(e).startswith(\"Unknown AI provider\"):\n        print(f\"Choose from: {e.split('Available: ')[-1]}\")\n    else:\n        raise","preventionTips":["Copy provider names from the CLI docs rather than typing from memory","Validate AI_PROVIDER values in CI config linting","After upgrades, re-check that configured provider names still exist in the registry"],"tags":["configuration","validation","llm","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}