Skip to content

Commit c9a7fcc

Browse files
committed
add support for google vertex
1 parent 3e0c5b1 commit c9a7fcc

File tree

12 files changed

+934
-6
lines changed

12 files changed

+934
-6
lines changed

docs/snippets/schemas/v3/index.schema.mdx

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,83 @@
14251425
"model"
14261426
],
14271427
"additionalProperties": false
1428+
},
1429+
"GoogleVertexLanguageModel": {
1430+
"type": "object",
1431+
"properties": {
1432+
"provider": {
1433+
"const": "google-vertex",
1434+
"description": "Google Vertex AI Configuration"
1435+
},
1436+
"model": {
1437+
"type": "string",
1438+
"description": "The name of the language model.",
1439+
"examples": [
1440+
"gemini-2.0-flash-exp",
1441+
"gemini-1.5-pro",
1442+
"gemini-1.5-flash"
1443+
]
1444+
},
1445+
"displayName": {
1446+
"type": "string",
1447+
"description": "Optional display name."
1448+
},
1449+
"project": {
1450+
"type": "string",
1451+
"description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."
1452+
},
1453+
"region": {
1454+
"type": "string",
1455+
"description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",
1456+
"examples": [
1457+
"us-central1",
1458+
"us-east1",
1459+
"europe-west1"
1460+
]
1461+
},
1462+
"credentials": {
1463+
"description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.",
1464+
"anyOf": [
1465+
{
1466+
"type": "object",
1467+
"properties": {
1468+
"secret": {
1469+
"type": "string",
1470+
"description": "The name of the secret that contains the token."
1471+
}
1472+
},
1473+
"required": [
1474+
"secret"
1475+
],
1476+
"additionalProperties": false
1477+
},
1478+
{
1479+
"type": "object",
1480+
"properties": {
1481+
"env": {
1482+
"type": "string",
1483+
"description": "The name of the environment variable that contains the token. Only supported in declarative connection configs."
1484+
}
1485+
},
1486+
"required": [
1487+
"env"
1488+
],
1489+
"additionalProperties": false
1490+
}
1491+
]
1492+
},
1493+
"baseUrl": {
1494+
"type": "string",
1495+
"format": "url",
1496+
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
1497+
"description": "Optional base URL."
1498+
}
1499+
},
1500+
"required": [
1501+
"provider",
1502+
"model"
1503+
],
1504+
"additionalProperties": false
14281505
}
14291506
},
14301507
"oneOf": [
@@ -1709,6 +1786,83 @@
17091786
"model"
17101787
],
17111788
"additionalProperties": false
1789+
},
1790+
{
1791+
"type": "object",
1792+
"properties": {
1793+
"provider": {
1794+
"const": "google-vertex",
1795+
"description": "Google Vertex AI Configuration"
1796+
},
1797+
"model": {
1798+
"type": "string",
1799+
"description": "The name of the language model.",
1800+
"examples": [
1801+
"gemini-2.0-flash-exp",
1802+
"gemini-1.5-pro",
1803+
"gemini-1.5-flash"
1804+
]
1805+
},
1806+
"displayName": {
1807+
"type": "string",
1808+
"description": "Optional display name."
1809+
},
1810+
"project": {
1811+
"type": "string",
1812+
"description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."
1813+
},
1814+
"region": {
1815+
"type": "string",
1816+
"description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",
1817+
"examples": [
1818+
"us-central1",
1819+
"us-east1",
1820+
"europe-west1"
1821+
]
1822+
},
1823+
"credentials": {
1824+
"description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.",
1825+
"anyOf": [
1826+
{
1827+
"type": "object",
1828+
"properties": {
1829+
"secret": {
1830+
"type": "string",
1831+
"description": "The name of the secret that contains the token."
1832+
}
1833+
},
1834+
"required": [
1835+
"secret"
1836+
],
1837+
"additionalProperties": false
1838+
},
1839+
{
1840+
"type": "object",
1841+
"properties": {
1842+
"env": {
1843+
"type": "string",
1844+
"description": "The name of the environment variable that contains the token. Only supported in declarative connection configs."
1845+
}
1846+
},
1847+
"required": [
1848+
"env"
1849+
],
1850+
"additionalProperties": false
1851+
}
1852+
]
1853+
},
1854+
"baseUrl": {
1855+
"type": "string",
1856+
"format": "url",
1857+
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
1858+
"description": "Optional base URL."
1859+
}
1860+
},
1861+
"required": [
1862+
"provider",
1863+
"model"
1864+
],
1865+
"additionalProperties": false
17121866
}
17131867
]
17141868
}

docs/snippets/schemas/v3/languageModel.schema.mdx

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,83 @@
285285
"model"
286286
],
287287
"additionalProperties": false
288+
},
289+
"GoogleVertexLanguageModel": {
290+
"type": "object",
291+
"properties": {
292+
"provider": {
293+
"const": "google-vertex",
294+
"description": "Google Vertex AI Configuration"
295+
},
296+
"model": {
297+
"type": "string",
298+
"description": "The name of the language model.",
299+
"examples": [
300+
"gemini-2.0-flash-exp",
301+
"gemini-1.5-pro",
302+
"gemini-1.5-flash"
303+
]
304+
},
305+
"displayName": {
306+
"type": "string",
307+
"description": "Optional display name."
308+
},
309+
"project": {
310+
"type": "string",
311+
"description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."
312+
},
313+
"region": {
314+
"type": "string",
315+
"description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",
316+
"examples": [
317+
"us-central1",
318+
"us-east1",
319+
"europe-west1"
320+
]
321+
},
322+
"credentials": {
323+
"description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.",
324+
"anyOf": [
325+
{
326+
"type": "object",
327+
"properties": {
328+
"secret": {
329+
"type": "string",
330+
"description": "The name of the secret that contains the token."
331+
}
332+
},
333+
"required": [
334+
"secret"
335+
],
336+
"additionalProperties": false
337+
},
338+
{
339+
"type": "object",
340+
"properties": {
341+
"env": {
342+
"type": "string",
343+
"description": "The name of the environment variable that contains the token. Only supported in declarative connection configs."
344+
}
345+
},
346+
"required": [
347+
"env"
348+
],
349+
"additionalProperties": false
350+
}
351+
]
352+
},
353+
"baseUrl": {
354+
"type": "string",
355+
"format": "url",
356+
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
357+
"description": "Optional base URL."
358+
}
359+
},
360+
"required": [
361+
"provider",
362+
"model"
363+
],
364+
"additionalProperties": false
288365
}
289366
},
290367
"oneOf": [
@@ -569,6 +646,83 @@
569646
"model"
570647
],
571648
"additionalProperties": false
649+
},
650+
{
651+
"type": "object",
652+
"properties": {
653+
"provider": {
654+
"const": "google-vertex",
655+
"description": "Google Vertex AI Configuration"
656+
},
657+
"model": {
658+
"type": "string",
659+
"description": "The name of the language model.",
660+
"examples": [
661+
"gemini-2.0-flash-exp",
662+
"gemini-1.5-pro",
663+
"gemini-1.5-flash"
664+
]
665+
},
666+
"displayName": {
667+
"type": "string",
668+
"description": "Optional display name."
669+
},
670+
"project": {
671+
"type": "string",
672+
"description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."
673+
},
674+
"region": {
675+
"type": "string",
676+
"description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",
677+
"examples": [
678+
"us-central1",
679+
"us-east1",
680+
"europe-west1"
681+
]
682+
},
683+
"credentials": {
684+
"description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.",
685+
"anyOf": [
686+
{
687+
"type": "object",
688+
"properties": {
689+
"secret": {
690+
"type": "string",
691+
"description": "The name of the secret that contains the token."
692+
}
693+
},
694+
"required": [
695+
"secret"
696+
],
697+
"additionalProperties": false
698+
},
699+
{
700+
"type": "object",
701+
"properties": {
702+
"env": {
703+
"type": "string",
704+
"description": "The name of the environment variable that contains the token. Only supported in declarative connection configs."
705+
}
706+
},
707+
"required": [
708+
"env"
709+
],
710+
"additionalProperties": false
711+
}
712+
]
713+
},
714+
"baseUrl": {
715+
"type": "string",
716+
"format": "url",
717+
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
718+
"description": "Optional base URL."
719+
}
720+
},
721+
"required": [
722+
"provider",
723+
"model"
724+
],
725+
"additionalProperties": false
572726
}
573727
]
574728
}

0 commit comments

Comments
 (0)