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
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,50 @@ All notable changes to this project will be documented in this file.

### Added

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing Feature Documentation: PR #225 feature not documented in CHANGELOG

Problem: This PR adds a significant new feature "Error Response Override" (错误响应覆盖) that allows users to customize error responses and status codes when error rules match. However, the CHANGELOG.md does not include any entry for this PR's main feature.

The PR:

  • Adds override_response and override_status_code database fields
  • Implements runtime override logic with validation (400-599 range)
  • Adds Claude API error format validator with 10KB size limit
  • Creates UI components for override configuration and error rule testing
  • Supports i18n for all 5 languages

Impact: Users reviewing the changelog will not be aware of this new capability, which defeats the purpose of maintaining a changelog.

Suggested Fix:
Add an entry under ### Added section:

- Add error response override feature with customizable error responses and status codes for error rules (#225) @ding113

Or more detailed:

- Add error response override feature allowing custom error responses and status codes when error rules match, with real-time JSON validation and error rule tester UI (#225) @ding113

- Add provider availability monitoring dashboard with real-time health status, metrics, and heatmap visualization (#216) @ding113
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

这是一个很棒的新功能,但它似乎没有被记录在 CHANGELOG.mdAdded 部分。为了方便用户了解版本更新,建议为这个新的错误响应覆盖功能添加一条更新日志。

Suggested change
- Add provider availability monitoring dashboard with real-time health status, metrics, and heatmap visualization (#216) @ding113
- Add error response override functionality with status code and body customization, including a frontend tester for real-time validation.
- Add provider availability monitoring dashboard with real-time health status, metrics, and heatmap visualization (#216) @ding113

- Add smart circuit breaker probing for faster provider recovery with configurable intervals (#216) @ding113
- Add enhanced provider testing with three-layer validation and preset templates for relay service verification (#216) @ding113
- Add real-time monitoring big screen dashboard with live metrics, 24h trends, provider slots status, and activity stream (#184) @ding113
- Add dark mode support with theme switcher in Dashboard and settings pages (#171) @ding113
- Add MCP (Model Context Protocol) passthrough functionality to forward tool calls to third-party AI services (#193) @ding113
- Add provider API test improvements with streaming response detection and enhanced error parsing (#199) @ding113
- Add configurable API test timeout via `API_TEST_TIMEOUT_MS` environment variable (#199) @ding113

### Changed

- Improve provider page performance by fixing N+1 queries and SQL full table scans (#216) @ding113
- Enhance error parsing with nested error structure support for relay services (#216) @ding113
- Adjust streaming idle timeout range from 1-120s to 60-600s (0 to disable) (#216) @ding113
- Add provider-specific User-Agent headers to avoid Cloudflare detection (#210) @ding113
- Increase provider dialog width to prevent horizontal scrollbar on long model redirect names (#210) @ding113
- Enhance data dashboard with comprehensive optimizations and improvements (#183) @ding113
- Update default provider timeout to unlimited for better compatibility (#199) @ding113
- Adjust streaming silent period timeout from 10s to 300s (#199) @ding113
- Improve usage records status code color display for better visibility (#199) @ding113
- Clarify provider response model labeling (#199) @ding113

### Fixed

- Fix session binding not updating after provider failover, causing repeated attempts to failed providers (#220) @ding113
- Fix provider availability monitoring page sorting order so high-availability providers rank first (#219) @ding113
- Fix provider daily usage statistics JSONB field name error (#216) @ding113
- Fix response content validation failure in provider testing (#216) @ding113
- Fix login redirect displaying duplicate language prefix (#216) @ding113
- Fix zh-TW missing 8 translation keys for apiTest (#216) @ding113
- Remove DialogContent hardcoded `sm:max-w-lg` width constraint (#216) @ding113
- Fix model test disclaimer display order (#210) @ding113
- Fix provider statistics, group settings persistence, and usage records date filtering; consolidate migrations 0020-0025 into single idempotent file (#207) @ding113
- Fix database migration duplicate enum type creation error (#181) @ding113
- Fix error handling and status codes in response handler, improve user management page UX (#179) @ding113
- Fix infinite loop in leaderboard tab switching (#178) @ding113
- Fix CI failures: Prettier formatting and React Hooks ESLint error in theme-switcher (#173) @ding113
- Fix Gemini model redirect not working correctly (#199) @ding113
- Fix model redirect info not being saved to database (#199) @ding113
- Fix provider multi-tag matching issue (#199) @ding113
- Fix error rules regex matching and cache refresh issues (#199) @ding113
- Fix proxy fallback "Body has already been read" error (#199) @ding113
- Fix ErrorRuleDetector lazy initialization race condition (#199) @ding113
- Fix Anthropic API test sending duplicate auth headers (#199) @ding113
- Fix Codex API test request body format (#199) @ding113
- Fix Pino logger timestamp configuration placement (#199) @ding113
- Fix data import cross-version compatibility and error prompts (#199) @ding113
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.9
0.3.15
8 changes: 6 additions & 2 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { config } from "dotenv";
import { defineConfig } from "drizzle-kit";

// Load environment variables from .env.local
config({ path: ".env.local" });
// Load environment variables following Next.js priority order
// Priority: .env.development.local > .env.local > .env.development > .env
const envFiles = [".env.development.local", ".env.local", ".env.development", ".env"];
for (const envFile of envFiles) {
config({ path: envFile });
}

export default defineConfig({
out: "./drizzle",
Expand Down
2 changes: 2 additions & 0 deletions drizzle/0021_broad_black_panther.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "error_rules" ADD COLUMN "override_response" jsonb;--> statement-breakpoint
ALTER TABLE "error_rules" ADD COLUMN "override_status_code" integer;
Loading
Loading