{"record":{"id":"8e35d59a63ddb4aa","repo":"HKUDS/DeepTutor","slug":"graphrag-provider-unsupported","errorCode":"graphrag_provider_unsupported","errorMessage":"GraphRAG cannot use this OAuth-only model provider. Choose an API-key profile.","messagePattern":"GraphRAG cannot use this OAuth-only model provider\\. Choose an API-key profile\\.","errorType":"exception","errorClass":"GraphRagUnsupportedProviderError","httpStatus":null,"severity":"error","filePath":"deeptutor/services/rag/pipelines/graphrag/provider.py","lineNumber":32,"sourceCode":"\ndef _runtime_binding(llm_cfg: Any) -> str:\n    return str(\n        getattr(llm_cfg, \"binding\", None) or getattr(llm_cfg, \"provider_name\", None) or \"openai\"\n    ).strip()\n\n\ndef resolve_completion_provider(llm_cfg: Any) -> str:\n    \"\"\"Map a resolved DeepTutor provider to the narrow LiteLLM transport GraphRAG needs.\"\"\"\n    binding = _runtime_binding(llm_cfg)\n    spec = find_by_name(binding)\n    if spec is None:\n        return \"openai\"\n    if spec.backend == \"anthropic\":\n        return \"anthropic\"\n    if spec.backend == \"azure_openai\":\n        return \"azure\"\n    if spec.backend in {\"openai_codex\", \"github_copilot\"} or spec.is_oauth:\n        raise GraphRagUnsupportedProviderError(\n            \"GraphRAG cannot use this OAuth-only model provider. Choose an API-key profile.\"\n        )\n    if spec.backend == \"openai_compat\":\n        # DeepSeek's LiteLLM provider owns its parameter compatibility logic.\n        # Other DeepTutor OpenAI-compatible profiles already expose an OpenAI\n        # chat-completions endpoint and are safest on the generic transport.\n        return \"deepseek\" if spec.name == \"deepseek\" else \"openai\"\n    raise GraphRagUnsupportedProviderError(\n        \"GraphRAG does not support the selected model provider transport.\"\n    )\n\n\ndef resolve_completion_model(llm_cfg: Any) -> str:\n    \"\"\"Return the model identifier expected by the selected LiteLLM transport.\"\"\"\n    model = str(getattr(llm_cfg, \"model\", \"\") or \"\")\n    spec = find_by_name(_runtime_binding(llm_cfg))\n    return strip_provider_prefix(model, spec)\n","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/services/rag/pipelines/graphrag/provider.py#L14-L50","documentation":"GraphRagUnsupportedProviderError (code graphrag_provider_unsupported) from resolve_completion_provider: the selected model profile uses an OAuth-only backend (openai_codex, github_copilot) or has spec.is_oauth true. GraphRAG's LiteLLM transports require plain API-key auth.","triggerScenarios":"Resolving the completion provider for GraphRAG settings/probe while the active chat model is a Codex or GitHub Copilot OAuth profile.","commonSituations":"Users whose day-to-day chat works fine via Copilot/Codex OAuth then attempt a GraphRAG build; default profile set to an OAuth backend in shared setups.","solutions":["Switch the active chat model to an API-key profile (OpenAI, Anthropic, DeepSeek, Azure OpenAI, or generic openai_compat).","Add an API-key profile for the same provider in Settings → Catalog and activate it for GraphRAG KBs."],"exampleFix":"# before\nactive chat model = \"github_copilot\" (OAuth)\n# after\nactive chat model = \"openai/gpt-4o\" (API key set)","handlingStrategy":"validation","validationCode":"spec = load_model_spec(active_chat_model)\nif spec.backend in {\"openai_codex\", \"github_copilot\"} or spec.is_oauth:\n    raise ConfigError(\"choose an API-key profile for GraphRAG\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep an API-key chat profile activated for RAG work even if daily chat uses OAuth."],"tags":["graphrag","oauth","provider-config","auth"],"backgroundTag":"oauth-provider-unsupported","analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}