Skip to content

Complete AI gateway state migration by removing Redis mirrors - #5990

Merged
chrarnoldus merged 1 commit into
mainfrom
remove-ai-gateway-state-redis-mirrors
Sep 9, 2026
Merged

Complete AI gateway state migration by removing Redis mirrors#5990
chrarnoldus merged 1 commit into
mainfrom
remove-ai-gateway-state-redis-mirrors

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • remove compatibility Redis writes for gateway routing config, provider-sync state, stale-alert state, and request-logging opt-ins after Move AI gateway state source of truth from Redis to PostgreSQL #5970 moved reads to PostgreSQL
  • delete the now-unused Redis key constants and their key-name tests
  • retain PostgreSQL row locking for concurrent authoritative state mutations
  • preserve the database-backed three-day stale-alert repeat interval

The legacy Redis values will expire naturally according to the TTLs applied before this cleanup.

Verification

  • formatted changed files with oxfmt
  • git diff --check
  • test, typecheck, and lint suites left to CI

@chrarnoldus chrarnoldus self-assigned this Sep 9, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Removed leftover Redis mirrors for AI gateway routing, provider-sync, stale-alert, and request-logging state; PostgreSQL remains the sole source of truth and no leftover Redis readers were found.

Files Reviewed (7 files)
  • apps/web/src/lib/ai-gateway/providers/openrouter/sync-providers-stale-alert.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/sync-providers-stale-alert.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/sync-providers.ts
  • apps/web/src/lib/ai-gateway/request-logging-opt-ins.ts
  • apps/web/src/lib/redis-keys.test.ts
  • apps/web/src/lib/redis-keys.ts
  • apps/web/src/routers/admin/gateway-config-router.ts

Reviewed by grok-4.6 · Input: 94.7K · Output: 7.2K · Cached: 278.8K

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants