Cordy Gateway

Changelog·Stable

This page mirrors the product repository changelog and is not a download or publication record. Read the product documentation.

v1.2.4Latest source entry2026-07-16

自 2026-07-16 起,changelog 条目提供中英文两个版本。/ From 2026-07-16, changelog entries are provided in both Chinese and English.

中文

1.2 线第四版:一条生产验收测试战役(非功能版本)。把 1.1.x1.2.3 的全部测试资产组织成 L0–L13 分层、带硬性门禁、可归档证据的验收流水线,并给「生产可用」一个可证伪定义。本版本关闭时一并纳入自 v1.2.3 以来的全部工程成果。

新增

  • L0–L13 生产验收测试主计划 + 环境矩阵 E0/E1/E2 + L6【P0】十维用户场景矩阵 + SLO 硬阈值;L4 conformance 实测(tests/conformance/,12 用例)+ L6 官方 openai SDK 全场景脚本(scripts/sdk_user_scenarios.py)。
  • v1.2.5 MEMBER 自助门户 + 预付余额计费(ADR-0017);v1.2.7 自托管 Langfuse 观测(ADR-0018)。
  • prometheus-client 原生多进程指标架构;Django 6 原生 psycopg 连接池。

修复(本轮 E0 复跑)

  • F-21(P0):所有 SSE 流式请求 500——三个缓冲请求体的中间件合成 http.disconnect 触发 Starlette StreamingResponse 取消;改为回放后委托真实 receive。
  • F-22:UserAdmin 批量操作按钮永久隐藏——改用 unfold.forms.ActionForm
  • F-23cryptography/pytest-timeout/uvicorn 未声明依赖,精确 uv sync 后崩溃——补声明。
  • F-24:pg_cron 夜间 prune 作业自 6 月起每晚失败(复合外键阻止裸 DROP)——DETACH+CASCADE 修复。
  • F-25request_logs 复合唯一约束在模型建表路径缺失致 drain ON CONFLICT 静默失败——补约束。

移除

  • v1.2.6:退役 auth_api + UserSession、删 native_backups 死 stub。

延后至 E1/E2:真实 provider 严格语义、稳态 300VUs×30min + 长 soak、真实 TLS testssl、破坏性 DR 全闭环、容器/历史扫描。

English

Fourth release on the 1.2 line: a production-acceptance test campaign (not a feature release). Organizes all 1.1.x1.2.3 test assets into an L0–L13 layered pipeline with hard gates and archivable evidence, and gives "production-ready" a falsifiable definition. Closing this version also folds in all engineering work accumulated since the v1.2.3 tag.

Added

  • L0–L13 production-acceptance master test plan + E0/E1/E2 environment matrix + the L6 [P0] ten-dimension user-scenario matrix + hard SLO thresholds; L4 conformance promoted to real tests (tests/conformance/, 12 cases) + the L6 official openai-SDK full-scenario script (scripts/sdk_user_scenarios.py).
  • v1.2.5 MEMBER self-service portal + prepaid-credit billing (ADR-0017); v1.2.7 self-hosted Langfuse observability (ADR-0018).
  • Native prometheus-client multiprocess metrics architecture; Django 6 native psycopg connection pool.

Fixed (this E0 re-run)

  • F-21 (P0): every SSE streaming request returned 500 — three body-buffering middlewares synthesized http.disconnect, which tripped Starlette's StreamingResponse cancellation; changed to delegate to the real receive after replay.
  • F-22: UserAdmin bulk-action Run button permanently hidden — switched to unfold.forms.ActionForm.
  • F-23: cryptography / pytest-timeout / uvicorn were undeclared dependencies that broke after an exact uv sync — now declared.
  • F-24: the nightly pg_cron prune job had failed every night since June (a composite FK blocked the bare DROP) — fixed with DETACH+CASCADE.
  • F-25: the request_logs composite unique constraint was missing on the model-built schema, silently failing the drain ON CONFLICT — constraint added.

Removed

  • v1.2.6: retired auth_api + UserSession, deleted the dead native_backups stub.

Deferred to E1/E2: real-provider strict semantics, steady 300VUs×30min + long soak, real TLS testssl, destructive DR full loop, container/history scans.

v0.2.02025-11-06

Changed - Provider Architecture Refactoring

🎯 Major Architecture Improvement: Unified LiteLLM Provider

Breaking Changes: None - API interface remains unchanged

Summary: Consolidated all LLM provider implementations into a single unified LiteLLM-based architecture, reducing codebase by 73% while enhancing functionality.

Removed

  • src/core/providers/openai.py (501 lines) - Redundant OpenAI provider
  • src/core/providers/anthropic.py (585 lines) - Redundant Anthropic provider
  • src/core/providers/openrouter.py (541 lines) - Redundant OpenRouter provider
  • Total removed: 1,627 lines of code (73% reduction)

Enhanced

  • LiteLLM Provider (src/core/providers/litellm_provider.py)
    • Added OpenRouter-specific configuration parameters:
      • openrouter_site_url: Optional site URL for analytics
      • openrouter_app_name: Optional app name for analytics
    • Automatic HTTP-Referer header injection for OpenRouter models
    • Automatic X-Title header injection for OpenRouter models
    • Enhanced error handling and timeout management
    • Support for 100+ LLM providers out of the box

Modified

  • Gateway Service (src/client_api/services/gateway.py)

    • Simplified _initialize_providers() to use only LiteLLM
    • Reduced _select_provider() from 50+ lines to 10 lines
    • Unified provider routing logic
    • Enhanced OpenRouter support with automatic header management
  • Provider Exports (src/core/providers/__init__.py)

    • Updated to export only LiteLLM provider
    • Removed references to deprecated direct providers

Benefits

Code Quality:

  • 73% less code to maintain (2,200 → 600 lines)
  • Single source of truth for all provider logic
  • Consistent error handling across all providers
  • Unified retry mechanism

Features:

  • ✅ OpenRouter analytics headers automatically injected
  • ✅ Support for 100+ providers via LiteLLM
  • ✅ Automatic parameter normalization
  • ✅ Built-in cost calculation
  • ✅ Enhanced streaming support

Maintenance:

  • Single codebase to debug and test
  • Automatic benefit from LiteLLM updates
  • Reduced testing complexity
  • Easier to add new providers (just configure API keys)

Supported Providers

All providers now accessed through unified LiteLLM interface:

  • OpenAI (GPT-3.5, GPT-4, GPT-4o, o1-preview, o1-mini)
  • Anthropic (Claude 3 Opus, Sonnet, Haiku; Claude 2.x)
  • OpenRouter (100+ models with automatic failover)
  • Google (Gemini Pro, PaLM 2)
  • Azure OpenAI
  • AWS Bedrock (Claude, Llama 2, Mistral, Cohere)
  • Cohere, Replicate, Hugging Face
  • Together AI, DeepInfra, Groq
  • Google Vertex AI
  • Ollama (local models)

Migration Guide

For Users: No changes required - API interface remains identical

For Developers:

# Old configuration (no longer needed)
USE_DIRECT_OPENAI="false"
USE_DIRECT_ANTHROPIC="false"

# New configuration (automatic via LiteLLM)
OPENAI_API_KEY="sk-..."
ANTHROPIC_API_KEY="sk-ant-..."
OPENROUTER_API_KEY="sk-or-..."

# OpenRouter analytics (optional but recommended)
OPENROUTER_SITE_URL="https://your-app.com"
OPENROUTER_APP_NAME="Your App Name"

OpenRouter Usage:

{
  "model": "openrouter/google/gemini-2.0-flash-exp:free",
  "messages": [{"role": "user", "content": "Hello"}]
}

Headers automatically injected:

{
  "HTTP-Referer": "https://your-app.com",
  "X-Title": "Your App Name"
}

Technical Details

Files Changed:

  • Modified: src/core/providers/litellm_provider.py
  • Modified: src/client_api/services/gateway.py
  • Modified: src/core/providers/__init__.py
  • Deleted: src/core/providers/openai.py
  • Deleted: src/core/providers/anthropic.py
  • Deleted: src/core/providers/openrouter.py

Testing:

  • ✅ Health checks passing
  • ✅ 50 models available
  • ✅ OpenRouter headers correctly injected
  • ✅ Error handling verified (rate limits, timeouts)
  • ✅ Parameter validation confirmed

Documentation Updates

  • Updated docs/PROVIDERS_GUIDE.md with unified architecture details
  • Added comprehensive ADR in docs/ARCHITECTURE-DECISION.md
  • Updated README_V3.md with new architecture diagram
  • Updated CHANGELOG.md (this file)

References

  • ADR: "决策:统一 LLM Provider 架构" in docs/ARCHITECTURE-DECISION.md
  • Provider Guide: docs/PROVIDERS_GUIDE.md
  • Architecture Diagram: README_V3.md

v0.1.02024-11-06

Added

  • Initial release with dual-service architecture
  • Admin API for management
  • Client API for LLM requests
  • Support for OpenAI, Anthropic, and OpenRouter providers
  • API key management
  • Basic monitoring and metrics
  • OpenAI-compatible API interface