跳到主要内容

aiProfilesUpdate

AiProfileMutationResult aiProfilesUpdate(AiProfile)

PUT /api/2.0/ai/profiles/update

Update a provider profile

Replaces a stored AI provider profile and returns it, re-checking name uniqueness and probing the credentials against the live provider again. The same two inputs are refused as on create - a private-network baseUrl and providerType: external - and the whole profile is overwritten by the one supplied rather than merged. On a portal running the AI gateway this answers 403, because profiles are managed centrally there. A profile that is bound to an action or an agent keeps those bindings.

Parameters​

NameInTypeDescriptionNotes
AiProfilebodyAiProfile[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the profile was updated, with the stored profile in profile.AiProfileMutationResult-
400The provider URL is missing, malformed, or points at a private network address.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI profiles are read-only on this portal because they are managed by the AI gateway.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiProfileMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json