Skip to content

Commit 71bcef6

Browse files
Merge branch 'new-advanced-llm-providers' into small-reqs2x-improvements
2 parents ff2304e + 1c1bbdc commit 71bcef6

3 files changed

Lines changed: 123 additions & 3 deletions

File tree

docs/reqs2x/reqs2x_documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The **VectorCAST Reqs2x tools** provide LLM-powered capabilities for requirement
1010
- **Generate VectorCAST test cases from requirements**
1111

1212

13-
All tools require a configured LLM provider to function. The tools support multiple LLM providers including Azure OpenAI, OpenAI, Anthropic, and LiteLLM.
13+
All tools require a configured LLM provider to function. The tools support multiple LLM providers including Azure OpenAI, OpenAI, Anthropic, LiteLLM, Azure APIM, and OpenAI Access Token.
1414

1515
This manual demonstrates Reqs2x usage workflows from inside this VS-Code extension using the `TUTORIAL_C` demo environment. Before starting, ensure you have the necessary components ready.
1616

package.json

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@
528528
"type": "string",
529529
"order": 13,
530530
"default": "openai",
531-
"enum": ["openai", "azure_openai", "anthropic", "litellm"],
532-
"enumDescriptions": ["OpenAI", "Azure OpenAI", "Anthropic", "LiteLLM"],
531+
"enum": ["openai", "azure_openai", "anthropic", "litellm", "azure_apim", "openai_at"],
532+
"enumDescriptions": ["OpenAI", "Azure OpenAI", "Anthropic", "LiteLLM", "Azure APIM (Advanced)", "OpenAI Access Token (Advanced)"],
533533
"description": "Language model provider for automatic requirements and test generation using Reqs2X"
534534
},
535535
"vectorcastTestExplorer.reqs2x.openai.apiKey": {
@@ -633,6 +633,72 @@
633633
"order": 30,
634634
"default": "",
635635
"description": "Environment variables to set when running LiteLLM, e.g., OPENAI_API_KEY=xxxx. Multiple variables can be separated by commas, e.g., OPENAI_API_KEY=xxxx,ANOTHER_ENV_VAR=yyyy. For a list of variables to set for a specific LiteLLM-compatible provider, see https://docs.litellm.ai/docs/providers."
636+
},
637+
"vectorcastTestExplorer.reqs2x.azureApim.subscriptionKey": {
638+
"type": "string",
639+
"order": 29,
640+
"default": "",
641+
"description": "[Advanced] Azure APIM subscription key (sent as the Ocp-Apim-Subscription-Key header)"
642+
},
643+
"vectorcastTestExplorer.reqs2x.azureApim.baseUrl": {
644+
"type": "string",
645+
"order": 30,
646+
"default": "",
647+
"description": "[Advanced] Azure APIM gateway base URL, e.g., https://ai-apimdev.azure-api.net/apim-vectorcast/v1"
648+
},
649+
"vectorcastTestExplorer.reqs2x.azureApim.modelName": {
650+
"type": "string",
651+
"order": 31,
652+
"default": "",
653+
"description": "[Advanced] Model name for the APIM-proxied LLM, e.g., gpt-4.1"
654+
},
655+
"vectorcastTestExplorer.reqs2x.azureApim.apiKey": {
656+
"type": "string",
657+
"order": 32,
658+
"default": "",
659+
"description": "[Advanced] Optional downstream Azure OpenAI API key (forwarded when the APIM policy requires it)"
660+
},
661+
"vectorcastTestExplorer.reqs2x.azureApim.reasoningModelName": {
662+
"type": "string",
663+
"order": 33,
664+
"default": "",
665+
"description": "[Advanced] Optional reasoning model name used for specialized reasoning subtasks (Azure APIM)."
666+
},
667+
"vectorcastTestExplorer.reqs2x.openaiAt.modelName": {
668+
"type": "string",
669+
"order": 34,
670+
"default": "",
671+
"description": "[Advanced] OpenAI Access Token model name"
672+
},
673+
"vectorcastTestExplorer.reqs2x.openaiAt.modelUrl": {
674+
"type": "string",
675+
"order": 35,
676+
"default": "",
677+
"description": "[Advanced] OpenAI Access Token model URL"
678+
},
679+
"vectorcastTestExplorer.reqs2x.openaiAt.authUrl": {
680+
"type": "string",
681+
"order": 36,
682+
"default": "",
683+
"description": "[Advanced] OpenAI Access Token authentication URL"
684+
},
685+
"vectorcastTestExplorer.reqs2x.openaiAt.appKey": {
686+
"type": "string",
687+
"order": 37,
688+
"default": "",
689+
"description": "[Advanced] OpenAI Access Token application key"
690+
},
691+
"vectorcastTestExplorer.reqs2x.openaiAt.appSecret": {
692+
"type": "string",
693+
"order": 38,
694+
"default": "",
695+
"description": "[Advanced] OpenAI Access Token application secret"
696+
},
697+
"vectorcastTestExplorer.reqs2x.openaiAt.reasoningModelName": {
698+
"type": "string",
699+
"order": 39,
700+
"default": "",
701+
"description": "[Advanced] Optional reasoning model name used for specialized reasoning subtasks (OpenAI Access Token)."
636702
}
637703
}
638704
}

src/requirements/requirementsUtils.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,60 @@ export function gatherLLMProviderSettings(): LLMProviderSettingsResult {
493493
baseEnv[key.trim()] = value.trim();
494494
}
495495
}
496+
} else if (provider === "azure_apim") {
497+
need(
498+
config.get<string>("reqs2x.azureApim.subscriptionKey"),
499+
"APIM Subscription Key",
500+
"VCAST_REQS2X_AZURE_APIM_SUBSCRIPTION_KEY"
501+
);
502+
need(
503+
config.get<string>("reqs2x.azureApim.baseUrl"),
504+
"APIM Base URL",
505+
"VCAST_REQS2X_AZURE_APIM_BASE_URL"
506+
);
507+
need(
508+
config.get<string>("reqs2x.azureApim.modelName"),
509+
"APIM Model Name",
510+
"VCAST_REQS2X_AZURE_APIM_MODEL_NAME"
511+
);
512+
optional(
513+
config.get<string>("reqs2x.azureApim.apiKey"),
514+
"VCAST_REQS2X_AZURE_APIM_API_KEY"
515+
);
516+
optional(
517+
config.get<string>("reqs2x.azureApim.reasoningModelName"),
518+
"VCAST_REQS2X_REASONING_AZURE_APIM_MODEL_NAME"
519+
);
520+
} else if (provider === "openai_at") {
521+
need(
522+
config.get<string>("reqs2x.openaiAt.modelName"),
523+
"OpenAI AT Model Name",
524+
"VCAST_REQS2X_OPENAI_AT_MODEL_NAME"
525+
);
526+
need(
527+
config.get<string>("reqs2x.openaiAt.modelUrl"),
528+
"OpenAI AT Model URL",
529+
"VCAST_REQS2X_OPENAI_AT_MODEL_URL"
530+
);
531+
need(
532+
config.get<string>("reqs2x.openaiAt.authUrl"),
533+
"OpenAI AT Auth URL",
534+
"VCAST_REQS2X_OPENAI_AT_AUTH_URL"
535+
);
536+
need(
537+
config.get<string>("reqs2x.openaiAt.appKey"),
538+
"OpenAI AT App Key",
539+
"VCAST_REQS2X_OPENAI_AT_APP_KEY"
540+
);
541+
need(
542+
config.get<string>("reqs2x.openaiAt.appSecret"),
543+
"OpenAI AT App Secret",
544+
"VCAST_REQS2X_OPENAI_AT_APP_SECRET"
545+
);
546+
optional(
547+
config.get<string>("reqs2x.openaiAt.reasoningModelName"),
548+
"VCAST_REQS2X_REASONING_OPENAI_AT_MODEL_NAME"
549+
);
496550
} else {
497551
missing.push("Unsupported provider value");
498552
}

0 commit comments

Comments
 (0)