{"record":{"id":"48d3ae4a8e05e1f1","repo":"openai/openai-python","slug":"expected-a-non-empty-value-for-fine-tuned-model-c","errorCode":null,"errorMessage":"Expected a non-empty value for `fine_tuned_model_checkpoint` but received {fine_tuned_model_checkpoint!r}","messagePattern":"Expected a non-empty value for `fine_tuned_model_checkpoint` but received (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/openai/resources/fine_tuning/checkpoints/permissions.py","lineNumber":83,"sourceCode":"        \"\"\"\n        **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).\n\n        This enables organization owners to share fine-tuned models with other projects\n        in their organization.\n\n        Args:\n          project_ids: The project identifiers to grant access to.\n\n          extra_headers: Send extra headers\n\n          extra_query: Add additional query parameters to the request\n\n          extra_body: Add additional JSON properties to the request\n\n          timeout: Override the client-level default timeout for this request, in seconds\n        \"\"\"\n        if not fine_tuned_model_checkpoint:\n            raise ValueError(\n                f\"Expected a non-empty value for `fine_tuned_model_checkpoint` but received {fine_tuned_model_checkpoint!r}\"\n            )\n        return self._get_api_list(\n            path_template(\n                \"/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions\",\n                fine_tuned_model_checkpoint=fine_tuned_model_checkpoint,\n            ),\n            page=SyncPage[PermissionCreateResponse],\n            body=maybe_transform({\"project_ids\": project_ids}, permission_create_params.PermissionCreateParams),\n            options=make_request_options(\n                extra_headers=extra_headers,\n                extra_query=extra_query,\n                extra_body=extra_body,\n                timeout=timeout,\n                security={\"bearer_auth\": True},\n            ),\n            model=PermissionCreateResponse,\n            method=\"post\",","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/resources/fine_tuning/checkpoints/permissions.py#L65-L101","documentation":"The fine-tuning checkpoint permissions create method requires a non-empty `fine_tuned_model_checkpoint` path parameter. Despite being named create, it lists permissions via `_get_api_list` on `/fine_tuning/checkpoints/{checkpoint}/permissions`, and the SDK validates the checkpoint id before building the URL, raising ValueError when it is None or empty.","triggerScenarios":"Calling `client.fine_tuning.checkpoints.permissions.create(fine_tuned_model_checkpoint=\"\")` or passing None, e.g. when the checkpoint id from a job was not captured.","commonSituations":"Reading `fine_tuned_model_checkpoint` from a fine-tuning job's events or result objects that omit it; blank values in permission-management scripts; copy-pasted placeholder ids.","solutions":["Use the checkpoint id returned by the fine-tuning job (e.g. from checkpoints list output)","Verify the value is a non-empty string before calling","If unsure of the id, list checkpoints for the job first to resolve it"],"exampleFix":"# before\nperms = client.fine_tuning.checkpoints.permissions.create(checkpoint_id or \"\", ...)\n# after\nif not checkpoint_id:\n    raise ValueError(\"checkpoint_id is required to create permissions\")\nperms = client.fine_tuning.checkpoints.permissions.create(checkpoint_id, ...)","handlingStrategy":"validation","validationCode":"if not fine_tuned_model_checkpoint:\n    raise ValueError(\"checkpoint id is required\")\nperms = client.fine_tuning.checkpoints.permissions.create(fine_tuned_model_checkpoint, ...)","typeGuard":"def is_non_empty_id(value: object) -> bool:\n    return isinstance(value, str) and bool(value.strip())","tryCatchPattern":"try:\n    perms = client.fine_tuning.checkpoints.permissions.create(ckpt, ...)\nexcept ValueError as e:\n    if \"fine_tuned_model_checkpoint\" in str(e):\n        ckpts = client.fine_tuning.checkpoints.list(fine_tuning_job_id=job_id)\n        ckpt = ckpts[0].id\n    else:\n        raise","preventionTips":["Capture checkpoint ids when fine-tuning jobs complete","Validate checkpoint ids before permission operations"],"tags":["python","openai","fine-tuning","permissions","path-parameter","valueerror"],"backgroundTag":"missing-required-parameter","analyzedSha":"9917c6e28e66e90e1227b3d223c06a8c5441515a","analyzedAt":"2026-08-28T11:46:34.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}