{"record":{"id":"e8900393ddd3069f","repo":"ATH-MaaS/Pixelle-Video","slug":"api-vlm-please-select-an-api-vl","errorCode":null,"errorMessage":"请先在素材分析服务中选择 API VLM 模型。 / Please select an API VLM model in the asset analysis service settings.","messagePattern":"请先在素材分析服务中选择 API VLM 模型。 / Please select an API VLM model in the asset analysis service settings\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"web/pipelines/asset_based.py","lineNumber":570,"sourceCode":"                                current=event.frame_current,\n                                total=event.frame_total\n                            )\n                        elif event.event_type == \"concatenating\":\n                            if event.extra_info == \"complete\":\n                                message = tr(\"asset_based.progress.concat_complete\")\n                            else:\n                                message = tr(\"progress.concatenating\")\n                        elif event.event_type == \"completed\":\n                            message = tr(\"progress.completed\")\n                        else:\n                            message = tr(f\"progress.{event.event_type}\")\n                        \n                        status_text.text(message)\n                        progress_bar.progress(min(int(event.progress * 100), 99))\n                    \n                    # Execute pipeline with progress callback\n                    if video_params.get(\"source\") == \"api\" and not video_params.get(\"analysis_vlm_model\"):\n                        raise RuntimeError(\n                            \"请先在素材分析服务中选择 API VLM 模型。\"\n                            if get_language() == \"zh_CN\"\n                            else \"Please select an API VLM model in the asset analysis service settings.\"\n                        )\n\n                    ctx = run_async(pipeline(\n                        assets=video_params[\"assets\"],\n                        video_title=video_params.get(\"video_title\", \"\"),\n                        intent=video_params.get(\"intent\"),\n                        duration=video_params.get(\"duration\", 30),\n                        source=video_params.get(\"source\", \"runninghub\"),\n                        analysis_image_workflow=video_params.get(\"analysis_image_workflow\"),\n                        analysis_video_workflow=video_params.get(\"analysis_video_workflow\"),\n                        analysis_vlm_model=video_params.get(\"analysis_vlm_model\"),\n                        bgm_path=video_params.get(\"bgm_path\"),\n                        bgm_volume=video_params.get(\"bgm_volume\", 0.2),\n                        bgm_mode=video_params.get(\"bgm_mode\", \"loop\"),\n                        api_video_workflow=video_params.get(\"api_video_workflow\"),","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/web/pipelines/asset_based.py#L552-L588","documentation":"In web/pipelines/asset_based.py's _render_output_preview, before executing the asset-based pipeline it validates that when video_params['source'] == 'api' an analysis VLM model is selected, raising RuntimeError with a localized (zh/en) message. This prevents calling the asset analysis service without a configured API VLM model.","triggerScenarios":"User selects 'api' as the asset-analysis source in the UI but leaves the analysis_vlm_model dropdown empty, then clicks generate; render() -> _render_output_preview() reaches the check and raises.","commonSituations":"Fresh install where the model list hasn't been fetched, so the dropdown stays empty; user switched source from 'local' to 'api' without picking a model; saved settings lost the model field after an upgrade.","solutions":["Open the asset analysis service settings and choose an API VLM model from the dropdown","Save the settings and verify analysis_vlm_model is persisted in video_params","If the dropdown is empty, check API credentials/endpoint so the model list can load","Switch source to 'local' if you intend to use a local VLM instead"],"exampleFix":"// before\nvideo_params = {\"source\": \"api\"}  # analysis_vlm_model missing\n// after\nvideo_params = {\"source\": \"api\", \"analysis_vlm_model\": \"glm-4v\"}","handlingStrategy":"validation","validationCode":"if video_params.get(\"source\") == \"api\" and not video_params.get(\"analysis_vlm_model\"):\n    raise ValueError(\"Select an API VLM model in asset analysis settings before generating.\")","typeGuard":null,"tryCatchPattern":"try:\n    run_async(pipeline(...))\nexcept RuntimeError as e:\n    if \"VLM model\" in str(e):\n        st.error(\"Please select an API VLM model in the asset analysis service settings.\")","preventionTips":["Make the analysis_vlm_model dropdown required in the UI when source == 'api'","Persist and re-validate settings after upgrades or source switches","Pre-fetch the model list on settings load so the field is never silently empty","Add a pre-flight config check before starting long-running renders"],"tags":["validation","configuration","vlm"],"backgroundTag":"missing-required-config","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}