Skip to content

Commit 715419b

Browse files
authored
Merge pull request #2827 from port-labs/PORTN-3687-add-ai-paths-to-api
Added the 8 new routes to the AI folder of the API
2 parents a90c62d + da8b65c commit 715419b

11 files changed

+1992
-2
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
id: change-a-specific-provider-configuration
3+
title: "Change a specific provider configuration"
4+
description: "This route allows you to change the configuration of a specific LLM provider."
5+
sidebar_label: "Change a specific provider configuration"
6+
hide_title: true
7+
hide_table_of_contents: true
8+
api: eJztWUtz4kYQ/iuqqRySCjLgsi/c8CYHV7xZl9ebi5ekBqlBs5Y0yjzYxSr993SPJBhAGDvr2jhbXECMpl/f9GuaksWgIyUKI2TORuw2ETpQ0hoIeJrKzzpYShsYGUQJz+cQmASCSOYzMbeKE00gZwEPdAGRmIkouLp6GxRKLkQM6oT1mOFzzUZ3bHzJJj2mIbJKmCWulGwKXIHCx0mFrxT8bUGbCxnj25KhDAO5oUdeFKmInLD+J01alkxHCWScnsyyANRbTj9BZFAgCi9AGQG6YYOqOi758t3Myd2mMMKktDDOTYLEItrhwgvxGyzfQ6TA/M4z8ORqo0Q+R4pM5FeQz03CRsOqqu0RCmIyfoce7eVxLMgknl57smY81VD19iv5roAcsXzFGo4frILgpfQkNbW0KoInbo+hSOUyQ9+5jL8ahS3pW9z/PUYXECsZ3e/CE0WgNepwGT8LI+02j1vqZ+I7F3VQPbYRNeXGgKIc8ecdDx8m5WkVuoefw48f43JY/cCQ29xyFSsu0ssYQcKUQBG+zdrf9wco3Sl/53A6sXnM9pVtBw5qgpLkApTCpKUP55RMxpB27vPVnRcmPMe1KOU2hhDzVg4mPAtPB6fng/PhGSm1ybemOCgecj5NwfftqZQp8Ny554zbFLOmURYIwEf9c79u306Jr3vde0FFaEPBFToOurl2lWKnyrS8caugSMCSpZYoKXehxhY8FTE38FdEiEaupPpescoLO4xXMQe5zch9UL2cC1zglE7D9U+vSE3XWUQqwyatVhipyVqpthpvaOIQcVVXFzLX9aGeDgb0tdkQ/FKDGNw0O8mlX6Y2y/tuZFEnd2qH6FeGvTyM+72q6j2pp3h11fl7U+j76guOXcB/3wX0/HjOJSWg6uBZHSgqk2Nv8X/uLWYzKuILeHs8lW92KqijAuyh4rHpykYzqTKObxj1WaERGOBrkotlZ5axRfxchg1JJ8OtjOT1Vy1Gu65zIPdssZT3bNUGHaIk2rPX0bhhlpPdeT7DrMznHXXIFWaDBaAzuroNL6tOvGrpT4Pr7AjX0+E6P3rX0+Fy6phExnTzss46uo2NWH8x7KdpFrbpQvfL9rFy/YtatNdOq1IkSIwp9Kjfx+bzhC4mJ0Iy6kd231q93uANWd8T4DWm7ah1BULd0a4viWOLOivxwJs7q7tHJsApr5FNdIg36wntr194VqSwNWHd6eG9c9jogdZdzqoCrsqLKyGPF6rNvZV/X2uoRT6Tztpm3naN8ATja5pHLtpOkw1PBqRZIbXJuHPRBow39ajbm2q3J7U5+naVzwsKb2r98nP0+twMfDH9IuXChYRzhbLxsDu2GOLGDR/D36NVfULXSNBW2lmWU67hg0qripbrMQa5Xix0g6Tz6B67Ry/ZN9jAVUtKOa9bcCWItJvNXpx+vGki7adgn5Wty+ZLX2ar2so812o3Lks61K/f1JLCW2KyJt9JUBRZNQXdIQrz6N6JF+TXH25phtD8bUGejYuKf6YKjp9OU+kMdw7v1kqWohNYl7NYzdK1RZbO0Y/RexejzYM3Z9jEYjt4azvo07u/bJKUZR2tVcW8M7awn6JBtt1NRzNBrf8Bwv0m8Q==
9+
sidebar_class_name: "put api-method"
10+
info_path: api-reference/port-api
11+
custom_edit_url: null
12+
---
13+
14+
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
15+
import ParamsDetails from "@theme/ParamsDetails";
16+
import RequestSchema from "@theme/RequestSchema";
17+
import StatusCodes from "@theme/StatusCodes";
18+
import OperationTabs from "@theme/OperationTabs";
19+
import TabItem from "@theme/TabItem";
20+
import Heading from "@theme/Heading";
21+
22+
<Heading
23+
as={"h1"}
24+
className={"openapi__heading"}
25+
children={"Change a specific provider configuration"}
26+
>
27+
</Heading>
28+
29+
<MethodEndpoint
30+
method={"put"}
31+
path={"/v1/llm-providers/{provider}"}
32+
context={"endpoint"}
33+
>
34+
35+
</MethodEndpoint>
36+
37+
38+
39+
This route allows you to change the configuration of a specific LLM provider.
40+
41+
<Heading
42+
id={"request"}
43+
as={"h2"}
44+
className={"openapi-tabs__heading"}
45+
children={"Request"}
46+
>
47+
</Heading>
48+
49+
<ParamsDetails
50+
parameters={[{"schema":{"type":"boolean"},"in":"query","name":"validate_connection","required":false},{"schema":{"type":"string","enum":["openai","azure-openai","anthropic","bedrock","port"]},"in":"path","name":"provider","required":true}]}
51+
>
52+
53+
</ParamsDetails>
54+
55+
<RequestSchema
56+
title={"Body"}
57+
body={{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"anyOf":[{"type":"object","title":"Anthropic","properties":{"apiKeySecretName":{"type":"string","minLength":1}},"required":["apiKeySecretName"],"additionalProperties":false},{"type":"object","title":"OpenAI","properties":{"apiKeySecretName":{"type":"string","minLength":1}},"required":["apiKeySecretName"],"additionalProperties":false},{"type":"object","title":"Azure OpenAI","properties":{"apiKeySecretName":{"type":"string","minLength":1},"resourceName":{"type":"string","minLength":1},"deploymentId":{"type":"string","minLength":1}},"required":["apiKeySecretName","resourceName","deploymentId"],"additionalProperties":false},{"type":"object","title":"Bedrock","properties":{"accessKeyIdSecretName":{"type":"string","minLength":1},"secretAccessKeySecretName":{"type":"string","minLength":1},"region":{"type":"string","minLength":1,"pattern":"^[a-z]{2}-[a-z]+-\\d{1}$"},"guardrailIdentifier":{"type":"string"},"guardrailVersion":{"type":"string"}},"required":["accessKeyIdSecretName","secretAccessKeySecretName","region"],"additionalProperties":false}]},"overrides":{"type":"object","properties":{"models":{"type":"object","required":["gpt-5","claude-sonnet-4-20250514"],"properties":{"gpt-5":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}},"additionalProperties":false},"claude-sonnet-4-20250514":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"enabled":{"type":"boolean","default":true}},"additionalProperties":false}}}}}
58+
>
59+
60+
</RequestSchema>
61+
62+
<StatusCodes
63+
id={undefined}
64+
label={undefined}
65+
responses={{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"result":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","azure-openai","anthropic","bedrock","port"]},"enabled":{"type":"boolean"},"config":{"anyOf":[{"type":"object","properties":{"apiKeySecretName":{"type":"string","minLength":1}},"required":["apiKeySecretName"],"additionalProperties":false},{"type":"object","properties":{"apiKeySecretName":{"type":"string","minLength":1}},"required":["apiKeySecretName"],"additionalProperties":false},{"type":"object","properties":{"apiKeySecretName":{"type":"string","minLength":1},"resourceName":{"type":"string","minLength":1},"deploymentId":{"type":"string","minLength":1}},"required":["apiKeySecretName","resourceName","deploymentId"],"additionalProperties":false},{"type":"object","properties":{"accessKeyIdSecretName":{"type":"string","minLength":1},"secretAccessKeySecretName":{"type":"string","minLength":1},"region":{"type":"string","minLength":1,"pattern":"^[a-z]{2}-[a-z]+-\\d{1}$"},"guardrailIdentifier":{"type":"string"},"guardrailVersion":{"type":"string"}},"required":["accessKeyIdSecretName","secretAccessKeySecretName","region"],"additionalProperties":false},{"anyOf":[{"not":{}},{"type":"object","properties":{},"additionalProperties":false}]}]},"overrides":{"type":"object","properties":{"models":{"type":"object","required":["gpt-5","claude-sonnet-4-20250514"],"properties":{"gpt-5":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}},"additionalProperties":false},"claude-sonnet-4-20250514":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"effectiveModels":{"type":"object","required":["gpt-5","claude-sonnet-4-20250514"],"properties":{"gpt-5":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}},"additionalProperties":false},"claude-sonnet-4-20250514":{"type":"object","properties":{"enabled":{"type":"boolean","default":true}},"additionalProperties":false}},"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}},"required":["provider","enabled","effectiveModels"],"additionalProperties":false}},"required":["ok","result"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ok","error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ok","error"],"additionalProperties":false}}}}}}
66+
>
67+
68+
</StatusCodes>
69+
70+
71+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
id: change-default-llm-provider-and-model
3+
title: "Change default LLM provider and model"
4+
description: "This route allows you to change the default LLM provider and model."
5+
sidebar_label: "Change default LLM provider and model"
6+
hide_title: true
7+
hide_table_of_contents: true
8+
api: eJzVVUtT2zAQ/isencmLIZfcQtsDUzqToXBictjYm1hEtlQ9AsHj/95d2SEOdWE65dBeEln70Lf7fVpVIkOXWmm81KWYidtcusTq4DEBpfSjS/Y6JF4naQ7lBhOfY5LhGoLyyfX1t8RYvZMZ2gTKLCl0hmoozoSHjROzezG/Essz4TANVvo97VRihWDR0nJZk8nij4DOX+qMrJVIdemx9LwEY5RMgWGNHhxjq4RLcyyAV35vkNDq1QOmng4kGAatl+jYegDV8XTeynJDnliGgqGRfwmSNuA5WBwcP0ufUzKZ0nqFmdXplvNr68WyPhOxxLfybowfTOk7VRAyHBDyEv3gYnA+Pp+Op5MLylI3dUuLGUe8oD1kp75AlkkuHdSiU9kalMP6NN7bgHHDGV26pv7z8Zj/Tpn93LJ203oyxo9pt952fFZaK4RSNJjowP+eLjJaBI/Z3PdlWmtbAFlERj4DLwsUx5DL/a8hZA0m+9OEbUhvwr8V1Gm45g623L0rRYqd/htqQ2t1j4RYBOgcbLDXlqEHqVzfsf2FV3Vvv5rT329XhONzTZHChFgd+Jw+RrvJSKlicCDPjdox6wRPULujrThAgyVBi9x742ajERg5ZLUPpaZy+qzBHR06w/g7t7vp6GEkv7SAwr7ins4toeDveSDEVj5HwmhbMsM5AmuMK2IKb46T/MsTFEbh6dU+3uD2TrZXr+Z0ax1Pl56jxILgJvPFFfly1Y2gJsMx+xrtfAFRMC24T83D9PajJM5O9dl5aj7qyWta5/HJj4wCGTUZ2ahaiu/FbkKOJyRHXC3NRE5O1bFjVa3A4Z1Vdc3b1FnLryctd2AlrLhN9zyZWhJYF1tijLrRlDW4ZTjsrkLD6KsLx1ppIuZpisa/6bvsiHZxd8ujtn2wuXzatPDIM4N+Z4IWOnY5aivuVUJRJ0O8g6JJybKBwG3pqm4bVdcuuKiDqdx3AL6WY1MH/3JVvSFV1Wia+nnwb0y/jWg7e/BmPunlrn8C138mAw==
9+
sidebar_class_name: "put api-method"
10+
info_path: api-reference/port-api
11+
custom_edit_url: null
12+
---
13+
14+
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
15+
import ParamsDetails from "@theme/ParamsDetails";
16+
import RequestSchema from "@theme/RequestSchema";
17+
import StatusCodes from "@theme/StatusCodes";
18+
import OperationTabs from "@theme/OperationTabs";
19+
import TabItem from "@theme/TabItem";
20+
import Heading from "@theme/Heading";
21+
22+
<Heading
23+
as={"h1"}
24+
className={"openapi__heading"}
25+
children={"Change default LLM provider and model"}
26+
>
27+
</Heading>
28+
29+
<MethodEndpoint
30+
method={"put"}
31+
path={"/v1/llm-providers/defaults"}
32+
context={"endpoint"}
33+
>
34+
35+
</MethodEndpoint>
36+
37+
38+
39+
This route allows you to change the default LLM provider and model.
40+
41+
<Heading
42+
id={"request"}
43+
as={"h2"}
44+
className={"openapi-tabs__heading"}
45+
children={"Request"}
46+
>
47+
</Heading>
48+
49+
<ParamsDetails
50+
parameters={undefined}
51+
>
52+
53+
</ParamsDetails>
54+
55+
<RequestSchema
56+
title={"Body"}
57+
body={{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","azure-openai","anthropic","bedrock","port"]},"model":{"type":"string","enum":["gpt-5","claude-sonnet-4-20250514"]}},"required":["provider","model"],"additionalProperties":false}}},"required":true}}
58+
>
59+
60+
</RequestSchema>
61+
62+
<StatusCodes
63+
id={undefined}
64+
label={undefined}
65+
responses={{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"result":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","azure-openai","anthropic","bedrock","port"]},"model":{"type":"string","enum":["gpt-5","claude-sonnet-4-20250514"]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}},"required":["provider","model"],"additionalProperties":false}},"required":["ok","result"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ok","error"],"additionalProperties":false}}}}}}
66+
>
67+
68+
</StatusCodes>
69+
70+
71+

0 commit comments

Comments
 (0)