{"record":{"id":"d087f8b7b658ea4d","repo":"TauricResearch/TradingAgents","slug":"unsupported-llm-provider-provider","errorCode":null,"errorMessage":"Unsupported LLM provider: {provider}","messagePattern":"Unsupported LLM provider: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tradingagents/llm_clients/factory.py","lineNumber":54,"sourceCode":"        return AnthropicClient(model, base_url, **kwargs)\n\n    if provider_lower == \"google\":\n        from .google_client import GoogleClient\n        return GoogleClient(model, base_url, **kwargs)\n\n    if provider_lower == \"azure\":\n        from .azure_client import AzureOpenAIClient\n        return AzureOpenAIClient(model, base_url, **kwargs)\n\n    if provider_lower == \"bedrock\":\n        from .bedrock_client import BedrockClient\n        return BedrockClient(model, base_url, **kwargs)\n\n    from .openai_client import OpenAIClient, is_openai_compatible\n    if is_openai_compatible(provider_lower):\n        return OpenAIClient(model, base_url, provider=provider_lower, **kwargs)\n\n    raise ValueError(f\"Unsupported LLM provider: {provider}\")\n","sourceCodeStart":36,"sourceCodeEnd":55,"githubUrl":"https://github.com/TauricResearch/TradingAgents/blob/a33fd4c0f134485a43553a2c23a63cb14adbd88f/tradingagents/llm_clients/factory.py#L36-L55","documentation":"ValueError raised by create_llm_client (tradingagents/llm_clients/factory.py) when the configured provider string matches none of the known providers (openai, azure/openai-azure, bedrock, deepseek/other OpenAI-compatible names) and fails the is_openai_compatible check. It means the provider name in your LLM config is unrecognized.","triggerScenarios":"Setting the quick-think/deep-think LLM provider in DEFAULT_CONFIG (or TradingAgentsGraph config) to a string like 'myprovider', 'google', or 'Azure' variants that don't match factory branches. The lowercased value falls through every branch and the final raise fires.","commonSituations":"Typos in provider names ('open_ai', 'awzure'); assuming a provider is supported because langchain supports it; missing integration for a vendor added after your package version.","solutions":["Use a supported provider string: 'openai', 'azure', 'bedrock', or an OpenAI-compatible name recognized by is_openai_compatible (e.g. 'deepseek', 'openai-compatible' base URLs).","If the vendor is OpenAI-API-compatible, point provider at the openai path and set base_url to the vendor endpoint.","Upgrade the package — new providers are added over time — and check factory.py for the current accepted list."],"exampleFix":"# before\nconfig['llm_provider_quick'] = 'gcp'\n\n# after\nconfig['llm_provider_quick'] = 'openai'\nconfig['quick_think_llm_base_url'] = 'https://your-openai-compatible-endpoint/v1'","handlingStrategy":"validation","validationCode":"SUPPORTED_PROVIDERS = {'openai', 'azure', 'bedrock'} | {\n    # plus whatever is_openai_compatible accepts; check factory.py for your version\n}\n\ndef is_supported_provider(provider: str) -> bool:\n    p = provider.strip().lower()\n    return p in SUPPORTED_PROVIDERS or p.replace('-', '').replace('_', '') in SUPPORTED_PROVIDERS","typeGuard":null,"tryCatchPattern":"from tradingagents.llm_clients.factory import create_llm_client\n\ntry:\n    client = create_llm_client(model, base_url, provider=provider)\nexcept ValueError:\n    client = create_llm_client(model, vendor_base_url, provider='openai')  # OpenAI-compatible fallback","preventionTips":["Validate provider strings against factory.py's accepted list at config load time.","For OpenAI-compatible vendors, use provider='openai' plus base_url instead of inventing provider names.","Re-check supported providers after each package upgrade."],"tags":["configuration","llm-provider","factory","validation"],"backgroundTag":null,"analyzedSha":"a33fd4c0f134485a43553a2c23a63cb14adbd88f","analyzedAt":"2026-08-14T19:45:16.920Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}