{"record":{"id":"b192157d5469cf33","repo":"HKUDS/DeepTutor","slug":"a-partner-uses-the-codex-login-of-the-account-that","errorCode":null,"errorMessage":"A partner uses the Codex login of the account that owns it.","messagePattern":"A partner uses the Codex login of the account that owns it\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"deeptutor/api/routers/settings.py","lineNumber":432,"sourceCode":"def _require_codex_oauth_actor() -> None:\n    \"\"\"Gate the Codex OAuth lifecycle: personal, not administrative.\n\n    Every one of these endpoints acts on the *caller's own* credentials —\n    ``get_codex_oauth_service()`` resolves the store, the model catalog, and\n    the callback route from owner scope — so requiring an administrator was\n    what left ordinary users unable to use Codex at all: an owner-bound\n    profile is (correctly) never grantable, and they could not sign in for\n    themselves either (#781).\n\n    A partner is refused: it is a synthetic user whose owner is a real\n    account, so letting one in would mean acting on that person's login —\n    including signing them out. Partners inherit the owner's login at call\n    time and need no lifecycle of their own.\n    \"\"\"\n    from deeptutor.services.partners.scope import is_partner_user_id\n\n    if is_partner_user_id(get_current_user().id):\n        raise HTTPException(\n            status_code=status.HTTP_403_FORBIDDEN,\n            detail=\"A partner uses the Codex login of the account that owns it.\",\n        )\n\n\ndef _codex_http_exception(error: CodexAuthError) -> HTTPException:\n    return HTTPException(\n        status_code=error.http_status,\n        detail={\n            \"code\": error.code,\n            \"message\": error.public_message,\n        },\n    )\n\n\ndef _provider_choices() -> dict[str, list[dict[str, Any]]]:\n    \"\"\"Build dropdown options for provider selection, keyed by service type.\"\"\"\n    from deeptutor.services.config.provider_runtime import (","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/settings.py#L414-L450","documentation":"Error \"A partner uses the Codex login of the account that owns it.\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/api/routers/settings.py:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}