Commit Graph
11 Commits
Author SHA1 Message Date
whit3rabbit af7fe570c7 fix: complete admin UI and backend wiring 2026-06-20 11:01:29 -05:00
whit3rabbitandClaude Opus 4.8 65cf673b97 feat: performative admin UI redesign + admin API contract fixes
Large admin-ui refactor (Performative component system, sidebar nav,
provider/route tabs) plus backend module restructuring.

Admin UI contract fixes (this session):
- Fix Models page crash: useBackends unwraps {backends:[...]}; align
  ModelEntry to {model_name, deployments} and ModelsResponse.strategy;
  fix add-model body to {model_name, actual_model, backend_name}.
- Fix Backends/Providers health rendering: source per-backend status and
  latency from the uptime endpoint (health_checks); narrow Backend type to
  the real get_backends shape.
- Route + sidebar-link the previously-unrouted Backends tab.

Verified: cargo test (exit 0), clippy -D warnings (exit 0), fmt --check,
admin-ui tsc + vite build all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 18:13:59 -05:00
whit3rabbit 1f300d8566 Fix virtual-key accounting across generation routes 2026-05-23 12:22:39 -05:00
whit3rabbitandClaude Sonnet 4.6 e3275f81da feat: env import/export, spend alerts, model allowlist, audit log, and misc hardening
Adds admin env file import/export (multipart upload + download), per-key
spend alerts (80/95/100% of budget), model allowlist with wildcard support,
audit log for admin mutations, CSRF one-time-use tokens, SSRF-safe OIDC/webhook
clients, sliding-window admin rate limiter, and configurable Redis fail policy.
Also updates batch_engine, client, translator mapping, and admin UI settings tab.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 16:57:22 -05:00
whit3rabbitandClaude Sonnet 4.6 1f9bb02968 feat: add Docker support, Gemini input handler, and batch engine improvements
Adds multi-arch Docker build with docker-compose, GitHub Actions CI workflow,
Gemini native input parsing, batch engine SQLite/file/webhook refactors,
and Bedrock streaming fixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 12:01:24 -05:00
whit3rabbitandClaude Sonnet 4.6 84315840f8 fix: harden security, fix expires_at TTL, improve translation accuracy
- Wrap admin token in Zeroizing<String> so memory is wiped on drop
- Use SSRF-safe HTTP client for Langfuse and webhook dispatcher
- Wire up webhook dispatcher at startup (was previously un-started)
- Fix batch expires_at: was using now instead of now+24h
- Extract epoch_secs() helper; replace 4 inline SystemTime::now() blocks
- Gemini tool_choice {type:tool}: use ANY+allowedFunctionNames instead of AUTO
- Map Anthropic thinking budget_tokens to OpenAI reasoning_effort
- Preserve temperature/top_p for GA o-series models (o1/o3/o3-mini/o4-mini);
  only strip for o1-preview and o1-mini which reject those params
- Azure simple config: always route through default_base_url; guard against
  double-appending deployment path when user provides a full URL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 13:33:23 -05:00
whit3rabbitandClaude Opus 4.6 04a58bfc6f style: run cargo fmt to fix CI formatting check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 05:46:21 -05:00
whit3rabbitandClaude Sonnet 4.6 2bc0125497 refactor(batch_engine): eliminate extra DB round-trip in cancel, consolidate format_epoch_iso8601
- Move format_epoch_iso8601 from queue/sqlite.rs to db.rs (single canonical location)
- Change cancel() to return BatchJob instead of BatchStatus so callers
  get the full job without a second query
- Pass batch_webhook_url directly to fire_webhook to avoid re-fetching the job
- Remove is_openai_or_azure_backend (duplicate of is_batch_supported)
- Replace magic literal 3 with DEFAULT_MAX_RETRIES constant

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 16:36:00 -05:00
whit3rabbitandClaude Sonnet 4.6 ef5f0f596c refactor(proxy): wire batch handlers through BatchEngine crate
Proxy batch handlers now use BatchEngine for job lifecycle, file storage,
and webhook delivery instead of direct SQLite calls. Old batch/db.rs
stripped to Anthropic-specific mapping only. Cancel endpoint at
POST /v1/batches/{id}/cancel. BatchEngine initialized in main.rs startup
with second SQLite connection. Cancel integration test added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 06:49:40 -05:00
whit3rabbit 2b885a0938 feat(batch_engine): scaffold crate with core types, queue, file store, webhook, and engine facade
- BatchId, ItemId, BatchJob, BatchItem, RequestCounts, BatchStatus, ExecutionMode
- EngineError, QueueError types
- JSONL validation migrated from proxy
- SQLite schema init with migration from old tables
- FileStore for batch file storage
- JobQueue trait + SqliteQueue with full job lifecycle
- WebhookQueue trait + SqliteWebhookQueue with durable delivery
- WebhookDispatcher background loop with HMAC signing
- BatchEngine facade: submit, get, list, cancel, get_items
- 32 tests passing, clippy clean
2026-03-31 06:24:49 -05:00
whit3rabbit 3c1571473b chore: scaffold batch_engine crate directory structure 2026-03-31 06:13:35 -05:00