4565 Commits

Author SHA1 Message Date
nyatoru
a40c463a87 feat(api): add JWT session auth fallback for models endpoint 2026-02-23 03:46:09 +07:00
diegosouzapw
5e0376c6c9 fix(test): correct JWT_SECRET assertion — required:false means missing is valid
The secretsValidator marks JWT_SECRET as required:false (auto-generated
at startup), but the test asserted valid:false when JWT_SECRET was missing.
This caused CI to fail with 367/368 tests passing.
v1.1.1
2026-02-22 16:42:09 -03:00
diegosouzapw
2bad777541 Merge PR #109: feat(codex): add workspace binding via chatgpt-account-id header
Adds strict workspace binding via persisted chatgpt-account-id for Team Plan support.
Includes code_review_rate_limit (3rd window) parsing.
Fixes #106
2026-02-22 16:34:04 -03:00
diegosouzapw
10793a7e65 Merge branch 'main' into feat/codex-teamplan
# Conflicts:
#	open-sse/services/usage.ts
2026-02-22 16:33:31 -03:00
diegosouzapw
5dab4058c8 fix(issues): API key creation crash (#108) & Codex code review quota (#106)
- Fix API_KEY_SECRET undefined crash with deterministic fallback
- Add code_review_rate_limit parsing for Team/Plus/Pro plan support
- Move feature-81 doc to completed/
- Bump version to v1.1.1
2026-02-22 16:28:44 -03:00
nyatoru
b26cc2a82e feat(codex): enhance base64 decoding for UTF-8 compatibility in JWT parsing 2026-02-23 01:32:48 +07:00
nyatoru
0610909116 feat(codex): add workspace binding via chatgpt-account-id header 2026-02-23 01:11:53 +07:00
Diego Rodrigues de Sa e Souza
f8a401da4b Merge pull request #107 from nyatoru/feat/deletedebugqwen
chore(qwen): remove debug console log from mapTokens
2026-02-22 11:41:51 -03:00
nyatoru
3b70e9f786 chore(qwen): remove debug console log from mapTokens 2026-02-22 20:23:37 +07:00
diegosouzapw
39f992a2a8 chore(release): bump version to v1.1.0 v1.1.0 2026-02-21 18:41:31 -03:00
Diego Rodrigues de Sa e Souza
0df1d46ae5 Merge pull request #104 from diegosouzapw/fix-issues-101-103
Fix OAuth client_secret issues (#103) & Codex Business quotas (#101)
2026-02-21 18:38:17 -03:00
diegosouzapw
28c7e0d62f Fix OAuth client_secret issues (#103) & Codex Business quotas (#101) 2026-02-21 18:24:56 -03:00
diegosouzapw
03965bf768 fix(db): remove OAuth fallback overwrite when email is missing to natively support multiple accounts 2026-02-21 13:04:06 -03:00
diegosouzapw
6b34a39f6e chore(release): bump version to v1.0.10 and update changelog v1.0.10 2026-02-21 12:35:37 -03:00
diegosouzapw
f0513683e5 fix(qwen): extract email from id_token to allow multiple accounts 2026-02-21 12:22:56 -03:00
diegosouzapw
b3e53ca250 chore(release): bump version to v1.0.9 and update changelog v1.0.9 2026-02-21 10:00:53 -03:00
diegosouzapw
7a3b21eff8 fix(settings): add blockedProviders and requireAuthForModels to Zod schema 2026-02-21 09:49:15 -03:00
diegosouzapw
f8c8501036 chore(release): bump version to v1.0.8 v1.0.8 2026-02-21 09:31:10 -03:00
Diego Rodrigues de Sa e Souza
4e1b5a5253 Merge pull request #102 from diegosouzapw/feat/issue-fixes-and-security
Release v1.0.8
2026-02-21 09:30:54 -03:00
diegosouzapw
1aa27ceefe chore(workflows): move agent workflows to global dir 2026-02-21 09:11:14 -03:00
diegosouzapw
340dcf9515 feat(core): api key protection, provider blocking, windows fix, ui and docs 2026-02-21 09:05:59 -03:00
Adarsh
1bd5d552c1 fix: extract email from id_token for Codex OAuth to allow multiple accounts (#97)
- Parse JWT id_token to extract email in mapTokens function
- Allows database to distinguish between different Codex accounts
- Fixes issue where adding 3rd+ Codex account would update existing connection instead of creating new one
2026-02-21 07:00:37 -03:00
Adarsh
862d94b859 Fix/auto generate jwt secret (#94)
* fix: auto-generate JWT_SECRET at startup if not provided
- Add ensureJwtSecret() in instrumentation.ts to generate random 64-char secret
- Mark JWT_SECRET as non-required in secretsValidator
- Remove fatal error log for missing JWT_SECRET in proxy.ts
Fixes login failure when running via CLI without JWT_SECRET env var.

* feat: improve auth flow and login page UX
- Add setupComplete to settings validation schema for proper persistence
- Support ?tab= query param in settings page for direct tab navigation
- Redesign login page with professional two-column layout
- Add context-aware states for onboarding/password setup flows
- Smooth animations and refined visual hierarchy

* fix: 404 page to use primary color theme (coral red) instead of purple
2026-02-21 06:55:40 -03:00
diegosouzapw
be36d9c452 Merge fix/issues-89-90-91-v1.0.7: resolve #89 #90 #91, bump v1.0.7 v1.0.7 2026-02-20 11:51:19 -03:00
diegosouzapw
5ce95dd829 fix: resolve issues #89 #90 #91 — stream default, custom models, OAuth redirect
- fix(chatCore): stream defaults to false per OpenAI spec (body.stream === true)
  closes #89
- fix(models): custom OpenAI-compatible providers now appear in /v1/models
  Added raw providerId check against activeAliases
  closes #90
- fix(OAuthModal): Google OAuth providers force localhost redirect URI
  Targeted amber warning + redirect_uri_mismatch error guidance for remote deployments
  closes #91
- docs: Add 'OAuth em Servidor Remoto' tutorial in README with 7-step Google Cloud guide
- docs: .env.example prominent warning block for Google OAuth remote setup
- chore: bump version 1.0.6 → 1.0.7
- docs: CHANGELOG entry for v1.0.7
2026-02-20 11:50:50 -03:00
diegosouzapw
d0fa01cc0a fix: increase JWT session to 30 days + auto-refresh in middleware
JWT session tokens now last 30 days instead of 24 hours. The middleware
silently refreshes the token when it has less than 7 days remaining,
so active users never get locked out of the dashboard.

Auto-refresh fires on any /dashboard request and sets a fresh 30-day
cookie via Set-Cookie header — completely transparent to the user.
2026-02-20 07:02:18 -03:00
diegosouzapw
c69ad118d1 release: v1.0.6 — provider/combo toggles, strict model filtering v1.0.6 2026-02-20 02:59:35 -03:00
diegosouzapw
0deeaf5ffb feat: combo enable/disable toggle + provider toggle always visible
1. Combos page: added Toggle to each ComboCard — disable/enable combos
   with optimistic UI update. Disabled combos show opacity-50.
2. /v1/models: disabled combos (isActive=false) are excluded from the
   model list.
3. Providers page: toggle is now always visible instead of hover-only.
2026-02-20 02:53:14 -03:00
diegosouzapw
87c7c92ddd fix: /v1/models only shows models from configured providers
Previously, if no connections existed in the database, ALL provider
models (378+) were shown as a fallback. Now only combos and custom
models appear when no provider connections are configured.

Models are strictly filtered by activeAliases — only providers with
at least one active (enabled) connection show their models. This
ensures /v1/models reflects exactly what the user has set up.
2026-02-20 02:44:38 -03:00
diegosouzapw
f12b90f373 fix: /v1/models respects disabled providers — track total connections before filter
Root cause: after filtering disabled connections (isActive=false), the
connections array could be empty. The fallback 'connections.length > 0'
then treated it as 'no connections configured' and showed ALL models.

Fix: Track totalConnectionCount before filtering. Use it in all filter
conditions so disabled providers are properly excluded even when every
connection is toggled off.
2026-02-20 02:35:10 -03:00
diegosouzapw
4e37027e1f feat: add enable/disable toggle to provider cards on main page
Toggle appears on hover next to the chevron. Clicking it batch-toggles
all connections for that provider (enable/disable). Uses optimistic UI
update with parallel API calls. stopPropagation prevents navigation.
2026-02-20 02:22:47 -03:00
diegosouzapw
245345f37d fix: treat private/LAN IPs as localhost for OAuth redirect URI
Google OAuth rejects private IPs (192.168.x.x, 10.x.x.x, 172.16-31.x.x)
with 'device_id and device_name are required' error. Now these are treated
the same as localhost, using http://localhost:{port}/callback as redirect URI.
2026-02-20 02:13:07 -03:00
diegosouzapw
99be29ce8e docs: update READMEs + CHANGELOG to v1.0.5 2026-02-20 01:50:06 -03:00
diegosouzapw
6aaaaccb12 fix: set DATA_DIR=/app/data in Dockerfile and docker-compose.yml
Ensures the Docker volume mount at /app/data matches the app data directory.
Previously DATA_DIR was not set, causing the app to default to ~/.omniroute/
which is not backed by the volume — leading to empty database on redeploys.
2026-02-20 01:47:22 -03:00
diegosouzapw
282c46fd46 chore: bump version to 1.0.5 v1.0.5 2026-02-20 01:43:53 -03:00
Diego Rodrigues de Sa e Souza
bc719875f6 fix: filter all model types in /v1/models by active providers (#88)
Previously only chat models were filtered by active provider connections.
Embedding, image, rerank, audio, and moderation models were always shown
regardless of whether the provider had any configured connections.

This caused providers like Together AI to appear in /v1/models even when
no API key was configured.

Closes #81

Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
2026-02-20 01:43:33 -03:00
Diego Rodrigues de Sa e Souza
78b634b204 release: v1.0.4 — WhatsApp community, changelog, version bump, README translations (#87)
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
v1.0.4
2026-02-19 22:43:27 -03:00
Diego Rodrigues de Sa e Souza
39aae51ca2 fix: OAuth login behind nginx — use actual origin for redirect URI (Closes #82) (#86)
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
2026-02-19 22:28:27 -03:00
Diego Rodrigues de Sa e Souza
937a8f3714 feat: filter api/models by active providers + disabled indicator on provider cards (Closes #81) (#85)
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
2026-02-19 22:22:16 -03:00
Diego Rodrigues de Sa e Souza
c34973f40d docs: add llm.txt for LLM and contributor onboarding (Closes #83) (#84)
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
2026-02-19 22:16:15 -03:00
Diego Rodrigues de Sa e Souza
3045aa3055 Merge pull request #80 from diegosouzapw/feature/logs-dashboard
feat(logs): Logs Dashboard with real-time Console Viewer (v1.0.3)
v1.0.3
2026-02-19 04:38:51 -03:00
diegosouzapw
1e332babd6 feat(logs): add Logs Dashboard with real-time Console Viewer
- Consolidated 4-tab Logs page: Request Logs, Proxy Logs, Audit Logs, Console
- Terminal-style Console Log Viewer with level filter, search, auto-scroll
- Console interceptor captures all console.log/warn/error to JSON log file
- Integrated in Next.js instrumentation.ts for both dev and prod
- Log rotation by size + retention-based cleanup
- Fixed pino logger file transport (pino/file targets only)
- Moved initAuditLog() to instrumentation.ts for proper initialization
- Bumped version to 1.0.3
- Updated CHANGELOG, all 8 README translations, and .env.example
2026-02-19 04:38:04 -03:00
Diego Rodrigues de Sa e Souza
2ddf63fde1 Merge pull request #79 from diegosouzapw/features-improvements
v1.0.2 — Security Hardening, Architecture & UX Polish
v1.0.2
2026-02-18 17:09:56 -03:00
diegosouzapw
de2ef14bc3 fix(ci): register @typescript-eslint plugin in ESLint flat config
- Install typescript-eslint as direct devDependency
- Import and register tseslint.plugin in eslint.config.mjs
- Fixes lint CI failure: plugin not found in ESLint 9 flat config
2026-02-18 16:59:31 -03:00
diegosouzapw
37123160e8 chore: bump version to 1.0.2
- package.json/package-lock.json: 1.0.1 → 1.0.2
- All 8 README files: 1.0.0 → 1.0.2 (Docker tags, tech notes, release commands)
- CHANGELOG.md: added v1.0.2 entry (security hardening, architecture, testing, UX)
2026-02-18 16:52:47 -03:00
diegosouzapw
5a645973eb fix(ui): correct Quick Start API key link to /dashboard/endpoint
- HomePageClient.tsx: 'Settings → API Keys' → 'Endpoint → Registered Keys'
- docs/page.tsx: same fix in Quick Start step 2
- Also includes user's manual fixes: bodySizeGuard, container imports, migrationRunner ESM compat
2026-02-18 16:40:33 -03:00
diegosouzapw
0279341221 feat(phase4): focus indicators, session management, k6 load tests, remove @ts-check
- U-3/U-4: Global focus-visible indicators + CSS focus-ring utility
- C-6: Removed @ts-check from 18 .ts files (redundant in TypeScript)
- T-5: k6 load test script (tests/load/proxy-load.js)
- P-3: SessionInfoCard component in Security settings tab
2026-02-18 14:51:15 -03:00
diegosouzapw
7efbfad9bd feat(phase2+3): DI container, plugins, PII sanitizer, tool policy, audit log, cache invalidation, ARIA, CSS vars
Phase 2 — Architecture & Quality:
- A-5: DI container (src/lib/container.ts)
- L-6: Prompt versioning (src/lib/db/prompts.ts)
- L-7: Eval scheduler (src/lib/evals/scheduler.ts)
- L-8: Plugin architecture (src/lib/plugins/index.ts)
- T-3: Integration tests (42 tests, 9 suites)

Phase 3 — UX & Polish:
- P-1: 500 error page (src/app/error.tsx)
- P-2: Audit log viewer (dashboard/audit-log/page.tsx)
- U-2: ARIA attributes on error pages
- U-5: Typed global-error.tsx params
- U-6: CSS variables for accent/semantic/traffic colors
- L-3: Output PII sanitization (src/lib/piiSanitizer.ts)
- L-4: Tool-calling allowlist/denylist (src/lib/toolPolicy.ts)
- L-9: Semantic cache invalidation API + auto-cleanup
- D-5: SECURITY.md updated to v1.0.x
- F-2: Deleted .env copy
2026-02-18 14:43:57 -03:00
diegosouzapw
3aca5fa691 feat: Implement initial database schema and centralize CORS configuration across API routes. 2026-02-18 13:44:08 -03:00
diegosouzapw
1a7b7e8799 feat: Implement graceful shutdown and body size guard middleware, and refine TypeScript typings across several routes and components. 2026-02-18 12:47:36 -03:00