@orchagent/cli 0.3.18 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/call.js +24 -3
- package/package.json +1 -1
package/dist/commands/call.js
CHANGED
|
@@ -209,7 +209,27 @@ argument or --file option instead.
|
|
|
209
209
|
}
|
|
210
210
|
else {
|
|
211
211
|
// Try to detect from environment or server
|
|
212
|
-
|
|
212
|
+
// If --provider specified, prioritize that provider
|
|
213
|
+
let providersToCheck = supportedProviders;
|
|
214
|
+
if (options.provider) {
|
|
215
|
+
(0, llm_1.validateProvider)(options.provider);
|
|
216
|
+
providersToCheck = [options.provider];
|
|
217
|
+
// Warn on potential model/provider mismatch
|
|
218
|
+
if (options.model) {
|
|
219
|
+
const modelLower = options.model.toLowerCase();
|
|
220
|
+
const providerPatterns = {
|
|
221
|
+
openai: /^(gpt-|o1-|o3-|davinci|text-)/,
|
|
222
|
+
anthropic: /^claude-/,
|
|
223
|
+
gemini: /^gemini-/,
|
|
224
|
+
ollama: /^(llama|mistral|deepseek|phi|qwen)/,
|
|
225
|
+
};
|
|
226
|
+
const expectedPattern = providerPatterns[options.provider];
|
|
227
|
+
if (expectedPattern && !expectedPattern.test(modelLower)) {
|
|
228
|
+
process.stderr.write(`Warning: Model '${options.model}' may not be a ${options.provider} model.\n\n`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
const detected = await (0, llm_1.detectLlmKey)(providersToCheck, resolved);
|
|
213
233
|
if (detected) {
|
|
214
234
|
llmKey = detected.key;
|
|
215
235
|
llmProvider = detected.provider;
|
|
@@ -227,8 +247,9 @@ argument or --file option instead.
|
|
|
227
247
|
}
|
|
228
248
|
else if (agentMeta.type === 'prompt') {
|
|
229
249
|
// Warn if no key found for prompt-based agent
|
|
230
|
-
const
|
|
231
|
-
|
|
250
|
+
const searchedProviders = options.provider ? [options.provider] : supportedProviders;
|
|
251
|
+
const providerList = searchedProviders.join(', ');
|
|
252
|
+
process.stderr.write(`Warning: No LLM key found for provider(s): ${providerList}\n` +
|
|
232
253
|
`Set an env var (e.g., OPENAI_API_KEY), run 'orchagent keys add <provider>', use --key, or configure in web dashboard\n\n`);
|
|
233
254
|
}
|
|
234
255
|
// Add skill headers
|