Problem
The OpenAPI schema definitions for addKey and editKey in src/app/api/actions/[...route]/route.ts are missing several fields that the backend Server Actions actually support. This causes these parameters to not appear in the Scalar/Swagger API documentation, even though passing them via the API works correctly.
Missing Fields
editKey (line 291-301)
Missing from requestSchema:
providerGroup (string | null, optional) - Provider group assignment (admin-only)
isEnabled (boolean, optional) - Enable/disable key
dailyResetMode ("fixed" | "rolling", optional) - Daily limit reset mode
dailyResetTime (string, optional) - Daily reset time (HH:mm format, fixed mode only)
cacheTtlPreference ("inherit" | "5m" | "1h", optional) - Cache TTL preference
addKey (line 263-274)
Missing from requestSchema:
providerGroup (string | null, optional) - Provider group assignment
isEnabled (boolean, optional) - Whether the key is enabled on creation
dailyResetMode ("fixed" | "rolling", optional) - Daily limit reset mode
dailyResetTime (string, optional) - Daily reset time (HH:mm format)
cacheTtlPreference ("inherit" | "5m" | "1h", optional) - Cache TTL preference
Impact
- API consumers relying on Scalar/Swagger docs cannot discover these fields
providerGroup is particularly important as it controls provider routing for keys, and users may think it can only be set at the user level
Expected Behavior
The OpenAPI requestSchema should include all fields that the corresponding Server Action accepts, so that Scalar/Swagger documentation accurately reflects the full API surface.
Problem
The OpenAPI schema definitions for
addKeyandeditKeyinsrc/app/api/actions/[...route]/route.tsare missing several fields that the backend Server Actions actually support. This causes these parameters to not appear in the Scalar/Swagger API documentation, even though passing them via the API works correctly.Missing Fields
editKey(line 291-301)Missing from
requestSchema:providerGroup(string | null, optional) - Provider group assignment (admin-only)isEnabled(boolean, optional) - Enable/disable keydailyResetMode("fixed" | "rolling", optional) - Daily limit reset modedailyResetTime(string, optional) - Daily reset time (HH:mm format, fixed mode only)cacheTtlPreference("inherit" | "5m" | "1h", optional) - Cache TTL preferenceaddKey(line 263-274)Missing from
requestSchema:providerGroup(string | null, optional) - Provider group assignmentisEnabled(boolean, optional) - Whether the key is enabled on creationdailyResetMode("fixed" | "rolling", optional) - Daily limit reset modedailyResetTime(string, optional) - Daily reset time (HH:mm format)cacheTtlPreference("inherit" | "5m" | "1h", optional) - Cache TTL preferenceImpact
providerGroupis particularly important as it controls provider routing for keys, and users may think it can only be set at the user levelExpected Behavior
The OpenAPI
requestSchemashould include all fields that the corresponding Server Action accepts, so that Scalar/Swagger documentation accurately reflects the full API surface.