Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
WORKER_URL: ${{ secrets.WORKER_URL }}
LITELLM_URL: ${{ secrets.LITELLM_URL }}
PROXY_GUEST_TOKEN: ${{ secrets.PROXY_GUEST_TOKEN }}
TURNSTILE_SITE_KEY: ${{ secrets.TURNSTILE_SITE_KEY }}
run: |
python3 <<'PY'
import json
Expand All @@ -61,6 +62,7 @@ jobs:
endpoints.append(val)

guest_token = os.environ.get("PROXY_GUEST_TOKEN") or "llm-fallbacks-public"
turnstile_site_key = (os.environ.get("TURNSTILE_SITE_KEY") or "").strip()
chat_proxy_path = Path("configs/chat_proxy.json")
if chat_proxy_path.is_file():
chat_proxy = json.loads(chat_proxy_path.read_text(encoding="utf-8"))
Expand All @@ -80,6 +82,8 @@ jobs:
"maxTokens": 512,
"appVersion": os.environ.get("APP_VERSION", ""),
}
if turnstile_site_key:
cfg["turnstileSiteKey"] = turnstile_site_key
body = "window.LLM_FALLBACKS_CONFIG = " + json.dumps(cfg, indent=2) + ";\n"
open("docs/config.js", "w", encoding="utf-8").write(body)
PY
Expand Down Expand Up @@ -123,7 +127,7 @@ jobs:
run: |
cd webui && npm ci && npm run build
cd ..
npx playwright test tests/e2e/pages-chat.spec.ts tests/e2e/failover-dual-endpoint.spec.ts tests/e2e/model-picker.spec.ts tests/e2e/message-actions.spec.ts
npx playwright test tests/e2e/pages-chat.spec.ts tests/e2e/failover-dual-endpoint.spec.ts tests/e2e/model-picker.spec.ts tests/e2e/message-actions.spec.ts tests/e2e/health-panel.spec.ts tests/e2e/turnstile-gate.spec.ts

- name: Run live Pages chat e2e (real proxy)
env:
Expand Down
4 changes: 3 additions & 1 deletion CONCEPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ Shared vocabulary for the static chat gateway and Python library.
|------|---------|
| **Render secondary** | LiteLLM on Render (`llm-fallbacks-gateway.onrender.com` pattern) |
| **loadRuntimeConfig** | `readRuntimeConfig()` + `mergeChatProxyArtifact()` — single bootstrap path for `FailoverProvider` |
| **Routing chip** | Per-reply UI showing endpoint, resolved model, and fallback hops (planned) |
| **Routing chip** | Per-reply UI showing endpoint, resolved model, and fallback hops |
| **Model selector** | Composer picker over `free_models.json`; separate from Failover endpoint settings |
| **Endpoint health probe** | Client-side GET to `/health` (or LiteLLM `/health/liveliness` on Render); ok / slow / fail |
| **Turnstile session** | Optional bot check at Worker; 1h KV pass per IP after successful siteverify |

## Learnings index

Expand Down
2 changes: 2 additions & 0 deletions docs/CAVEATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Honest limits for the public chat demo and the Python library.
| **Backup server auth** | The browser sends the same guest token to every endpoint. The Worker accepts it; the Render backup may return 401 until a LiteLLM virtual key is set up. |
| **Saved settings** | If you changed proxy URLs in the browser, old values stay in localStorage. Clear site data if the failover list looks wrong after an update. |
| **Usage stats** | We count sessions and completions without storing message text. This is not full product analytics. |
| **Routing headers** | The routing chip reads `x-llm-fallbacks-endpoint` and LiteLLM headers from proxy responses. After edge changes, redeploy the Worker (`Deploy Proxies` workflow) for production to expose them. |
| **Turnstile** | Optional bot check when `TURNSTILE_SECRET` is set on the Worker and `turnstileSiteKey` is in `docs/config.js`. Skipped in local dev when secrets are absent. |

## Library and CI

Expand Down
Loading
Loading