support volcengine + migrate ui tars to volcengine (#2705)

This commit is contained in:
LawyZheng
2025-06-13 21:17:32 +08:00
committed by GitHub
parent 40e608f9cd
commit 296d2f903b
9 changed files with 95 additions and 87 deletions

View File

@@ -160,30 +160,26 @@ def setup_llm_providers() -> None:
else:
update_or_add_env_var("ENABLE_NOVITA", "false")
console.print("\n[bold blue]--- UI-TARS Configuration ---[/bold blue]")
console.print("To enable UI-TARS (Seed1.5-VL), you must have a ByteDance Doubao API key.")
console.print("UI-TARS now uses direct VolcEngine API calls for improved compatibility.")
enable_ui_tars = Confirm.ask("Do you want to enable UI-TARS?")
if enable_ui_tars:
ui_tars_api_key = Prompt.ask("Enter your ByteDance Doubao API key", password=True)
if not ui_tars_api_key:
console.print("[red]Error: UI-TARS API key is required. UI-TARS will not be enabled.[/red]")
console.print("\n[bold blue]--- VolcEngine Configuration ---[/bold blue]")
console.print("To enable VolcEngine, you must have a ByteDance Doubao API key.")
enable_volcengine = Confirm.ask("Do you want to enable VolcEngine?")
if enable_volcengine:
volcengine_api_key = Prompt.ask("Enter your VolcEngine(ByteDance Doubao) API key", password=True)
if not volcengine_api_key:
console.print("[red]Error: VolcEngine key is required. VolcEngine will not be enabled.[/red]")
else:
update_or_add_env_var("UI_TARS_API_KEY", ui_tars_api_key)
update_or_add_env_var("ENABLE_UI_TARS", "true")
update_or_add_env_var("VOLCENGINE_API_KEY", volcengine_api_key)
update_or_add_env_var("ENABLE_VOLCENGINE", "true")
# Optional: Allow customizing model endpoint
custom_model = Confirm.ask(
"Do you want to use a custom model endpoint? (default: doubao-1-5-thinking-vision-pro-250428)"
model_options.extend(
[
"VOLCENGINE_DOUBAO_SEED_1_6",
"VOLCENGINE_DOUBAO_SEED_1_6_FLASH",
"VOLCENGINE_DOUBAO_1_5_THINKING_VISION_PRO",
]
)
if custom_model:
ui_tars_model = Prompt.ask("Enter your UI-TARS model endpoint ID")
if ui_tars_model:
update_or_add_env_var("UI_TARS_MODEL", ui_tars_model)
model_options.append("UI_TARS_SEED1_5_VL")
else:
update_or_add_env_var("ENABLE_UI_TARS", "false")
update_or_add_env_var("ENABLE_VOLCENGINE", "false")
console.print("\n[bold blue]--- OpenAI-Compatible Provider Configuration ---[/bold blue]")
console.print("To enable an OpenAI-compatible provider, you must have a model name, API key, and API base URL.")