fix(classic): fix CI failures - install Playwright and auto-detect model

- Add 'playwright install chromium' step to Forge CI workflow
- Auto-detect default model from available API keys (ANTHROPIC_API_KEY,
  OPENAI_API_KEY, GROQ_API_KEY) in direct_benchmark harness
- Prefer Claude > OpenAI > Groq, fallback to OpenAI if no keys found
This commit is contained in:
Nick Tindle
2026-02-12 15:46:54 -06:00
parent ac7de17eb4
commit 711f0da63c
5 changed files with 55 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
AGENT_NAME=mini-agi
REPORTS_FOLDER="reports/mini-agi"
OPENAI_API_KEY="sk-" # for LLM eval
BUILD_SKILL_TREE=false # set to true to build the skill tree.

View File

@@ -0,0 +1,14 @@
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.
# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.
# When adding additional environment variables, the schema in "/src/env.mjs"
# should be updated accordingly.
# Prisma
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
DATABASE_URL="file:./db.sqlite"

View File

@@ -19,6 +19,22 @@ from .models import (
from .ui import console
def get_default_model() -> str:
"""Get the default model based on available API keys.
Returns the model preset name for the first available API key,
preferring Claude > OpenAI > Groq.
"""
if os.environ.get("ANTHROPIC_API_KEY"):
return "claude"
elif os.environ.get("OPENAI_API_KEY"):
return "openai"
elif os.environ.get("GROQ_API_KEY"):
return "groq"
# Fallback to openai (most commonly available in CI)
return "openai"
@click.group()
@click.version_option(version="0.1.0")
def cli():
@@ -40,8 +56,8 @@ def cli():
@click.option(
"--models",
"-m",
default="claude",
help=f"Comma-separated model presets. Available: {', '.join(MODEL_PRESETS.keys())}",
default=None,
help=f"Comma-separated model presets. Auto-detects from API keys if not specified. Available: {', '.join(MODEL_PRESETS.keys())}",
)
@click.option(
"--categories",
@@ -232,7 +248,7 @@ def cli():
)
def run(
strategies: str,
models: str,
models: Optional[str],
categories: Optional[str],
skip_categories: Optional[str],
tests: Optional[str],
@@ -280,7 +296,11 @@ def run(
console.print(f"Available: {STRATEGIES}")
sys.exit(1)
# Parse models
# Parse models (auto-detect from API keys if not specified)
if models is None:
models = get_default_model()
console.print(f"[dim]Auto-detected model: {models}[/dim]")
model_list = [m.strip() for m in models.split(",")]
invalid_models = [m for m in model_list if m not in MODEL_PRESETS]
if invalid_models: