{"record":{"id":"5abc1872cedb06dc","repo":"BerriAI/litellm","slug":"target-model-names-on-list-fine-tuning-jobs-must-b","errorCode":null,"errorMessage":"target_model_names on list fine-tuning jobs must be a list of one model name. Example: ['gpt-4o']","messagePattern":"target_model_names on list fine-tuning jobs must be a list of one model name\\. Example: \\['gpt-4o'\\]","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/fine_tuning_endpoints/endpoints.py","lineNumber":433,"sourceCode":"        base_llm_response_processor: Final = ProxyBaseLLMRequestProcessing(data=data)\n        (\n            data,\n            litellm_logging_obj,\n        ) = await base_llm_response_processor.common_processing_pre_call_logic(\n            request=request,\n            general_settings=general_settings,\n            user_api_key_dict=user_api_key_dict,\n            version=version,\n            proxy_logging_obj=proxy_logging_obj,\n            proxy_config=proxy_config,\n            route_type=CallTypes.alist_fine_tuning_jobs.value,\n        )\n\n        response: Any | None = None\n        if target_model_names and isinstance(target_model_names, str):\n            target_model_names_list: Final = target_model_names.split(\",\")\n            if len(target_model_names_list) != 1:\n                raise HTTPException(\n                    status_code=400,\n                    detail=\"target_model_names on list fine-tuning jobs must be a list of one model name. Example: ['gpt-4o']\",\n                )\n            ## Use router to list fine-tuning jobs for that model\n            if llm_router is None:\n                raise HTTPException(\n                    status_code=500,\n                    detail=\"LLM Router not initialized. Ensure models added to proxy.\",\n                )\n            data[\"model\"] = target_model_names_list[0]\n            response = await llm_router.alist_fine_tuning_jobs(\n                **data,\n                after=after,\n                limit=limit,\n            )\n            return response\n        elif custom_llm_provider:\n            # get configs for custom_llm_provider","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/fine_tuning_endpoints/endpoints.py#L415-L451","documentation":"Validation of the list-fine-tuning-jobs filter: target_model_names must be a single-element list (one model name) because the provider filter accepts exactly one model; the example shows the expected shape.","triggerScenarios":"Thrown at litellm/proxy/fine_tuning_endpoints/endpoints.py:433 when the library encounters an invalid state.","commonSituations":"List fine-tuning jobs received zero or multiple target model names.","solutions":["Pass target_model_names as a single-element list, e.g. ['gpt-4o']."],"exampleFix":"target_model_names=[\"gpt-4o\"]","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"}