mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add ai_gateway_keys table and related RBAC (#25563)
Adds table to store keys that AI Gateway standalone replicas will use to authenticate into Coderd. Also adds RBAC and audit boilerplate.
This commit is contained in:
Generated
+12
@@ -15269,6 +15269,10 @@ const docTemplate = `{
|
||||
"enum": [
|
||||
"all",
|
||||
"application_connect",
|
||||
"ai_gateway_key:*",
|
||||
"ai_gateway_key:create",
|
||||
"ai_gateway_key:delete",
|
||||
"ai_gateway_key:read",
|
||||
"ai_model_price:*",
|
||||
"ai_model_price:read",
|
||||
"ai_model_price:update",
|
||||
@@ -15499,6 +15503,10 @@ const docTemplate = `{
|
||||
"x-enum-varnames": [
|
||||
"APIKeyScopeAll",
|
||||
"APIKeyScopeApplicationConnect",
|
||||
"APIKeyScopeAiGatewayKeyAll",
|
||||
"APIKeyScopeAiGatewayKeyCreate",
|
||||
"APIKeyScopeAiGatewayKeyDelete",
|
||||
"APIKeyScopeAiGatewayKeyRead",
|
||||
"APIKeyScopeAiModelPriceAll",
|
||||
"APIKeyScopeAiModelPriceRead",
|
||||
"APIKeyScopeAiModelPriceUpdate",
|
||||
@@ -22329,6 +22337,7 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"*",
|
||||
"ai_gateway_key",
|
||||
"ai_model_price",
|
||||
"ai_provider",
|
||||
"ai_seat",
|
||||
@@ -22380,6 +22389,7 @@ const docTemplate = `{
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ResourceWildcard",
|
||||
"ResourceAIGatewayKey",
|
||||
"ResourceAiModelPrice",
|
||||
"ResourceAIProvider",
|
||||
"ResourceAiSeat",
|
||||
@@ -22641,6 +22651,7 @@ const docTemplate = `{
|
||||
"ai_seat",
|
||||
"ai_provider",
|
||||
"ai_provider_key",
|
||||
"ai_gateway_key",
|
||||
"group_ai_budget",
|
||||
"chat",
|
||||
"user_secret",
|
||||
@@ -22676,6 +22687,7 @@ const docTemplate = `{
|
||||
"ResourceTypeAISeat",
|
||||
"ResourceTypeAIProvider",
|
||||
"ResourceTypeAIProviderKey",
|
||||
"ResourceTypeAIGatewayKey",
|
||||
"ResourceTypeGroupAIBudget",
|
||||
"ResourceTypeChat",
|
||||
"ResourceTypeUserSecret",
|
||||
|
||||
Generated
+12
@@ -13653,6 +13653,10 @@
|
||||
"enum": [
|
||||
"all",
|
||||
"application_connect",
|
||||
"ai_gateway_key:*",
|
||||
"ai_gateway_key:create",
|
||||
"ai_gateway_key:delete",
|
||||
"ai_gateway_key:read",
|
||||
"ai_model_price:*",
|
||||
"ai_model_price:read",
|
||||
"ai_model_price:update",
|
||||
@@ -13883,6 +13887,10 @@
|
||||
"x-enum-varnames": [
|
||||
"APIKeyScopeAll",
|
||||
"APIKeyScopeApplicationConnect",
|
||||
"APIKeyScopeAiGatewayKeyAll",
|
||||
"APIKeyScopeAiGatewayKeyCreate",
|
||||
"APIKeyScopeAiGatewayKeyDelete",
|
||||
"APIKeyScopeAiGatewayKeyRead",
|
||||
"APIKeyScopeAiModelPriceAll",
|
||||
"APIKeyScopeAiModelPriceRead",
|
||||
"APIKeyScopeAiModelPriceUpdate",
|
||||
@@ -20460,6 +20468,7 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"*",
|
||||
"ai_gateway_key",
|
||||
"ai_model_price",
|
||||
"ai_provider",
|
||||
"ai_seat",
|
||||
@@ -20511,6 +20520,7 @@
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ResourceWildcard",
|
||||
"ResourceAIGatewayKey",
|
||||
"ResourceAiModelPrice",
|
||||
"ResourceAIProvider",
|
||||
"ResourceAiSeat",
|
||||
@@ -20762,6 +20772,7 @@
|
||||
"ai_seat",
|
||||
"ai_provider",
|
||||
"ai_provider_key",
|
||||
"ai_gateway_key",
|
||||
"group_ai_budget",
|
||||
"chat",
|
||||
"user_secret",
|
||||
@@ -20797,6 +20808,7 @@
|
||||
"ResourceTypeAISeat",
|
||||
"ResourceTypeAIProvider",
|
||||
"ResourceTypeAIProviderKey",
|
||||
"ResourceTypeAIGatewayKey",
|
||||
"ResourceTypeGroupAIBudget",
|
||||
"ResourceTypeChat",
|
||||
"ResourceTypeUserSecret",
|
||||
|
||||
Reference in New Issue
Block a user