mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd/database): add AI Gateway key auth lookup and last-used queries (#26505)
Adds DB methods`GetAIGatewayKeyIDByHashedSecret` and `UpdateAIGatewayKeyLastUsedAt`. `GetAIGatewayKeyIDByHashedSecret` - returns AI Gateway key ID by hashed secret value. `UpdateAIGatewayKeyLastUsedAt` - updates last used timestamp for given AI Gateway key. Used by standalone AI Gateway for authentication and keeping track of currently used keys.
This commit is contained in:
Generated
+2
@@ -15490,6 +15490,7 @@ const docTemplate = `{
|
||||
"ai_gateway_key:create",
|
||||
"ai_gateway_key:delete",
|
||||
"ai_gateway_key:read",
|
||||
"ai_gateway_key:update",
|
||||
"ai_model_price:*",
|
||||
"ai_model_price:read",
|
||||
"ai_model_price:update",
|
||||
@@ -15724,6 +15725,7 @@ const docTemplate = `{
|
||||
"APIKeyScopeAiGatewayKeyCreate",
|
||||
"APIKeyScopeAiGatewayKeyDelete",
|
||||
"APIKeyScopeAiGatewayKeyRead",
|
||||
"APIKeyScopeAiGatewayKeyUpdate",
|
||||
"APIKeyScopeAiModelPriceAll",
|
||||
"APIKeyScopeAiModelPriceRead",
|
||||
"APIKeyScopeAiModelPriceUpdate",
|
||||
|
||||
Generated
+2
@@ -13830,6 +13830,7 @@
|
||||
"ai_gateway_key:create",
|
||||
"ai_gateway_key:delete",
|
||||
"ai_gateway_key:read",
|
||||
"ai_gateway_key:update",
|
||||
"ai_model_price:*",
|
||||
"ai_model_price:read",
|
||||
"ai_model_price:update",
|
||||
@@ -14064,6 +14065,7 @@
|
||||
"APIKeyScopeAiGatewayKeyCreate",
|
||||
"APIKeyScopeAiGatewayKeyDelete",
|
||||
"APIKeyScopeAiGatewayKeyRead",
|
||||
"APIKeyScopeAiGatewayKeyUpdate",
|
||||
"APIKeyScopeAiModelPriceAll",
|
||||
"APIKeyScopeAiModelPriceRead",
|
||||
"APIKeyScopeAiModelPriceUpdate",
|
||||
|
||||
Reference in New Issue
Block a user