-
Notifications
You must be signed in to change notification settings - Fork 0
Optimization flow UI, schema relaxation, and in-memory KV #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
629d283
dcef889
be78b54
f94fdfc
2bbdd3e
0e4ec47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,34 @@ | ||
| import { defineConfig, devices } from "@playwright/test"; | ||
| import { parse } from "@std/dotenv"; | ||
|
|
||
| const readEnvFile = (): Record<string, string> => { | ||
| try { | ||
| const raw = Deno.readTextFileSync(".env"); | ||
| return parse(raw); | ||
| } catch (e) { | ||
| if (e instanceof Deno.errors.NotFound) { | ||
| return {}; | ||
| } | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| const envFromFile = readEnvFile(); | ||
| const getEnv = (key: string, fallback?: string) => | ||
| Deno.env.get(key) ?? envFromFile[key] ?? fallback ?? ""; | ||
|
|
||
| const llmBaseUrl = getEnv("LLM_BASE_URL", "https://openrouter.ai/api/v1"); | ||
| const llmApiKey = getEnv("LLM_API_KEY"); | ||
| const llmModel = getEnv("LLM_MODEL", "openai/gpt-4o-mini"); | ||
|
|
||
|
Comment on lines
+20
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Playwright webServer now defaults Useful? React with 👍 / 👎. |
||
| // Warn when targeting a remote LLM provider without an API key | ||
| const isLocalhost = /^https?:\/\/(localhost|127\.0\.0\.1)(:\d+)?/.test(llmBaseUrl); | ||
| if (!llmApiKey && !isLocalhost) { | ||
| console.warn( | ||
| `[playwright] LLM_API_KEY is empty while LLM_BASE_URL points to a remote provider (${llmBaseUrl}). ` + | ||
| "LLM calls will likely fail with 401. Set LLM_API_KEY in .env or environment.", | ||
| ); | ||
| } | ||
| export default defineConfig({ | ||
| testDir: "./tests/e2e", | ||
| timeout: 60_000, | ||
|
|
@@ -18,10 +47,16 @@ export default defineConfig({ | |
| reuseExistingServer: !Deno.env.get("CI"), | ||
| timeout: 120_000, | ||
| env: { | ||
| LMSTUDIO_BASE_URL: "http://127.0.0.1:1234/v1", | ||
| LMSTUDIO_API_KEY: "lm-studio", | ||
| LMSTUDIO_MODEL: "gpt-oss-120b", | ||
| LMSTUDIO_JUDGE_MODEL: "gpt-oss-120b", | ||
| ...Deno.env.toObject(), | ||
| LLM_BASE_URL: llmBaseUrl, | ||
| LLM_API_KEY: llmApiKey, | ||
| LLM_MODEL: llmModel, | ||
| POLL_ENABLED: "false", | ||
| EVAL_REPLICATES: "1", | ||
| OPT_CONCURRENCY: "3", | ||
| OPT_ITERATIONS: "1", | ||
| OPT_PATCH_CANDIDATES: "1", | ||
| EPICS_LIMIT: "1", | ||
| }, | ||
| }, | ||
| projects: [ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.