MCPcopy Index your code
hub / github.com/simstudioai/sim / getProviderCredentialSubBlocks

Function getProviderCredentialSubBlocks

apps/sim/blocks/utils.ts:248–378  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246 * Usage: Spread into your block's subBlocks array after block-specific fields
247 */
248export 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',

Callers 6

pi.tsFile · 0.90
router.tsFile · 0.90
guardrails.tsFile · 0.90
evaluator.tsFile · 0.90
translate.tsFile · 0.90
agent.tsFile · 0.90

Calls 2

getScopesForServiceFunction · 0.90
getApiKeyConditionFunction · 0.85

Tested by

no test coverage detected