{"record":{"id":"f1f48f077d3ad8c9","repo":"openai/codex","slug":"expected-generated-params-model-or-dict-got-type","errorCode":null,"errorMessage":"Expected generated params model or dict, got {type(params).__name__}","messagePattern":"Expected generated params model or dict, got (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"sdk/python/src/openai_codex/client.py","lineNumber":108,"sourceCode":"        | V2LoginAccountParams\n        | JsonObject\n        | None\n    ),\n) -> JsonObject:\n    if params is None:\n        return {}\n    if hasattr(params, \"model_dump\"):\n        dumped = params.model_dump(\n            by_alias=True,\n            exclude_none=True,\n            mode=\"json\",\n        )\n        if not isinstance(dumped, dict):\n            raise TypeError(\"Expected model_dump() to return dict\")\n        return dumped\n    if isinstance(params, dict):\n        return params\n    raise TypeError(f\"Expected generated params model or dict, got {type(params).__name__}\")\n\n\ndef _installed_codex_path() -> Path:\n    try:\n        from codex_cli_bin import bundled_codex_path\n    except ImportError as exc:\n        raise FileNotFoundError(\n            \"Unable to locate the pinned Codex runtime. Install the published SDK build \"\n            f\"with its {RUNTIME_PKG_NAME} dependency, or set CodexConfig.codex_bin \"\n            \"explicitly.\"\n        ) from exc\n\n    return bundled_codex_path()\n\n\ndef _installed_codex_path_dirs() -> tuple[Path, ...]:\n    try:\n        from codex_cli_bin import bundled_path_dir","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/sdk/python/src/openai_codex/client.py#L90-L126","documentation":"Error \"Expected generated params model or dict, got {type(params).__name__}\" thrown in openai/codex.","triggerScenarios":"Thrown at sdk/python/src/openai_codex/client.py:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a dict or the generated params model for this method instead of the given type."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}