()
| 246 | * Usage: Spread into your block's subBlocks array after block-specific fields |
| 247 | */ |
| 248 | export function getProviderCredentialSubBlocks(): SubBlockConfig[] { |
| 249 | return [ |
| 250 | { |
| 251 | id: 'vertexCredential', |
| 252 | title: 'Google Cloud Account', |
| 253 | type: 'oauth-input', |
| 254 | serviceId: 'vertex-ai', |
| 255 | canonicalParamId: 'vertexCredential', |
| 256 | mode: 'basic', |
| 257 | requiredScopes: getScopesForService('vertex-ai'), |
| 258 | placeholder: 'Select Google Cloud account', |
| 259 | required: true, |
| 260 | condition: { |
| 261 | field: 'model', |
| 262 | value: VERTEX_MODELS, |
| 263 | }, |
| 264 | }, |
| 265 | { |
| 266 | id: 'vertexManualCredential', |
| 267 | title: 'Google Cloud Account', |
| 268 | type: 'short-input', |
| 269 | canonicalParamId: 'vertexCredential', |
| 270 | mode: 'advanced', |
| 271 | placeholder: 'Enter credential ID', |
| 272 | required: true, |
| 273 | condition: { |
| 274 | field: 'model', |
| 275 | value: VERTEX_MODELS, |
| 276 | }, |
| 277 | }, |
| 278 | { |
| 279 | id: 'apiKey', |
| 280 | title: 'API Key', |
| 281 | type: 'short-input', |
| 282 | placeholder: 'Enter your API key', |
| 283 | password: true, |
| 284 | connectionDroppable: false, |
| 285 | required: true, |
| 286 | condition: getApiKeyCondition(), |
| 287 | }, |
| 288 | { |
| 289 | id: 'azureEndpoint', |
| 290 | title: 'Azure Endpoint', |
| 291 | type: 'short-input', |
| 292 | password: true, |
| 293 | placeholder: 'https://your-resource.services.ai.azure.com', |
| 294 | connectionDroppable: false, |
| 295 | hideWhenEnvSet: 'NEXT_PUBLIC_AZURE_CONFIGURED', |
| 296 | condition: { |
| 297 | field: 'model', |
| 298 | value: AZURE_MODELS, |
| 299 | }, |
| 300 | }, |
| 301 | { |
| 302 | id: 'azureApiVersion', |
| 303 | title: 'Azure API Version', |
| 304 | type: 'short-input', |
| 305 | placeholder: 'Enter API version', |
no test coverage detected