fix: default openrouter key from env
Some checks failed
CI / go-test (push) Has been cancelled
CI / scripts-regression (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / docker-build (push) Has been cancelled

This commit is contained in:
phamnazage-jpg
2026-05-30 11:16:52 +08:00
parent 18158650ca
commit 9ff023dab4

View File

@@ -93,7 +93,7 @@ func main() {
func parseArgs() Config {
loadProjectEnv()
apiKey := flag.String("api-key", "", "OpenRouter API Key")
apiKey := flag.String("api-key", os.Getenv("OPENROUTER_API_KEY"), "OpenRouter API Key")
apiURL := flag.String("api-url", "https://openrouter.ai/api/v1/models", "API 地址")
outPath := flag.String("out", "models.json", "输出文件路径")
maxRetries := flag.Int("retry", 3, "最大重试次数")