{"record":{"id":"c2ba10951a6c3531","repo":"BerriAI/litellm","slug":"fine-tuning-config-is-not-set-set-it-on-your-conf","errorCode":null,"errorMessage":"fine_tuning_config is not set, set it on your config.yaml file.","messagePattern":"fine_tuning_config is not set, set it on your config\\.yaml file\\.","errorType":"exception","errorClass":"ValueError","httpStatus":500,"severity":"error","filePath":"litellm/proxy/fine_tuning_endpoints/endpoints.py","lineNumber":55,"sourceCode":"    if not isinstance(config, list):\n        raise ValueError(\"invalid fine_tuning config, expected a list is not a list\")\n\n    for element in config:\n        if isinstance(element, dict):\n            for key, value in element.items():\n                if isinstance(value, str) and value.startswith(\"os.environ/\"):\n                    element[key] = litellm.get_secret(value)\n\n    fine_tuning_config = config\n\n\n# Function to search for specific custom_llm_provider and return its configuration\ndef get_fine_tuning_provider_config(\n    custom_llm_provider: str,\n):\n    global fine_tuning_config\n    if fine_tuning_config is None:\n        raise ValueError(\"fine_tuning_config is not set, set it on your config.yaml file.\")\n    for setting in fine_tuning_config:\n        if setting.get(\"custom_llm_provider\") == custom_llm_provider:\n            return setting\n    return None\n\n\n@router.post(\n    \"/v1/fine_tuning/jobs\",\n    dependencies=[Depends(user_api_key_auth)],\n    tags=[\"fine-tuning\"],\n    summary=\"✨ (Enterprise) Create Fine-Tuning Job\",\n)\n@router.post(\n    \"/fine_tuning/jobs\",\n    dependencies=[Depends(user_api_key_auth)],\n    tags=[\"fine-tuning\"],\n    summary=\"✨ (Enterprise) Create Fine-Tuning Job\",\n)","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/fine_tuning_endpoints/endpoints.py#L37-L73","documentation":"Raised by get_fine_tuning_provider_config when fine-tuning is requested but set_fine_tuning_config was never given a fine_tuning_settings block (or received None). The proxy has no per-provider fine-tuning credentials/base URLs, so it cannot build the provider client; the fix is adding the fine_tuning_settings list to config.yaml.","triggerScenarios":"Thrown at litellm/proxy/fine_tuning_endpoints/endpoints.py:55 when the library encounters an invalid state.","commonSituations":"A fine-tuning endpoint was called but fine_tuning_config is absent from the proxy config.","solutions":["Add fine_tuning_config to your config.yaml before using fine-tuning endpoints."],"exampleFix":"fine_tuning_config:\n  - finetune_settings:\n      custom_llm_provider: openai","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}