agency-orchestrator 0.6.13 → 0.6.14

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/cli.js CHANGED
@@ -433,10 +433,12 @@ async function handleInit() {
433
433
  if (cfgModel)
434
434
  updates.AO_MODEL = cfgModel;
435
435
  if (cfgBaseUrl) {
436
- // Route to the env var the matching connector already reads
436
+ // Route to the env var the matching connector already reads.
437
+ // 每个 provider 写到自己专属的 BASE_URL env,避免 issue #16 的跨污染
437
438
  const p = (cfgProvider || '').toLowerCase();
438
439
  const urlVar = p === 'ollama' ? 'OLLAMA_BASE_URL' :
439
- 'OPENAI_BASE_URL';
440
+ p === 'deepseek' ? 'DEEPSEEK_BASE_URL' :
441
+ 'OPENAI_BASE_URL';
440
442
  updates[urlVar] = cfgBaseUrl;
441
443
  }
442
444
  if (cfgApiKey) {
@@ -28,9 +28,11 @@ export function createConnector(config) {
28
28
  case 'claude':
29
29
  return new ClaudeConnector(config.api_key);
30
30
  case 'deepseek':
31
+ // 不 fallback OPENAI_BASE_URL — issue #16: 用户设了 OPENAI_BASE_URL=openai.com 后切到
32
+ // deepseek 会用 OpenAI endpoint + DeepSeek key 调,得到 405。每个 provider 用自己专属 env
31
33
  return new OpenAICompatibleConnector({
32
34
  apiKey: config.api_key || process.env.DEEPSEEK_API_KEY,
33
- baseUrl: config.base_url || process.env.OPENAI_BASE_URL || 'https://api.deepseek.com/v1',
35
+ baseUrl: config.base_url || process.env.DEEPSEEK_BASE_URL || 'https://api.deepseek.com/v1',
34
36
  });
35
37
  case 'openai':
36
38
  return new OpenAICompatibleConnector({
@@ -7,7 +7,8 @@
7
7
  import type { LLMConnector, LLMResult, LLMConfig } from '../types.js';
8
8
  export declare class OpenAICompatibleConnector implements LLMConnector {
9
9
  private apiKey;
10
- private baseUrl;
10
+ /** 只读暴露给外部 debug / 测试用,运行时不可变 */
11
+ readonly baseUrl: string;
11
12
  constructor(options?: {
12
13
  apiKey?: string;
13
14
  baseUrl?: string;
@@ -11,6 +11,7 @@ function estimateTokens(text) {
11
11
  }
12
12
  export class OpenAICompatibleConnector {
13
13
  apiKey;
14
+ /** 只读暴露给外部 debug / 测试用,运行时不可变 */
14
15
  baseUrl;
15
16
  constructor(options = {}) {
16
17
  this.apiKey = options.apiKey || process.env.OPENAI_API_KEY || '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agency-orchestrator",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "Multi-agent YAML workflow engine — 211 AI roles, auto DAG parallelism, zero code. One sentence → multiple AI roles collaborate → complete plan in minutes. 10 LLM providers, 7 need no API key.",
5
5
  "keywords": [
6
6
  "multi-agent",
@@ -64,7 +64,7 @@
64
64
  "scripts": {
65
65
  "build": "tsc",
66
66
  "dev": "tsc --watch",
67
- "test": "npx tsx test/run.ts && npx tsx test/condition.ts && npx tsx test/cli.ts && npx tsx test/compose.ts && npx tsx test/demo.ts && npx tsx test/e2e.ts && npx tsx test/e2e-condition.ts && npx tsx test/e2e-loop.ts && npx tsx test/mcp.ts",
67
+ "test": "npx tsx test/run.ts && npx tsx test/condition.ts && npx tsx test/cli.ts && npx tsx test/compose.ts && npx tsx test/demo.ts && npx tsx test/factory-custom.ts && npx tsx test/step-llm.ts && npx tsx test/step-llm-yaml.ts && npx tsx test/stdin-limit.ts && npx tsx test/compose-name.ts && npx tsx test/e2e.ts && npx tsx test/e2e-condition.ts && npx tsx test/e2e-loop.ts && npx tsx test/mcp.ts",
68
68
  "prepublishOnly": "npm run build"
69
69
  },
70
70
  "files": [