@agnt-sdk/studio 0.0.35 → 0.0.36
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/executorFactory.d.ts +9 -1
- package/dist/executorFactory.d.ts.map +1 -1
- package/dist/executorFactory.js +28 -8
- package/dist/executorFactory.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/deepseek.d.ts +7 -18
- package/dist/providers/deepseek.d.ts.map +1 -1
- package/dist/providers/deepseek.js +7 -209
- package/dist/providers/deepseek.js.map +1 -1
- package/dist/providers/openaiCompatible.d.ts +47 -0
- package/dist/providers/openaiCompatible.d.ts.map +1 -0
- package/dist/providers/openaiCompatible.js +241 -0
- package/dist/providers/openaiCompatible.js.map +1 -0
- package/dist/types.d.ts +11 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
* Executor Factory
|
|
3
3
|
*
|
|
4
4
|
* Creates provider-specific executor instances from a v2 PromptManifest.
|
|
5
|
-
*
|
|
5
|
+
* Adapter families:
|
|
6
|
+
* - anthropic → AnthropicExecutor
|
|
7
|
+
* - openai → OpenAIExecutor
|
|
8
|
+
* - google / gemini → GoogleExecutor
|
|
9
|
+
* - bedrock → BedrockExecutor
|
|
10
|
+
* - openai-compatible → OpenAICompatibleExecutor
|
|
11
|
+
* (together, fireworks, deepinfra, deepseek, and any host that speaks the
|
|
12
|
+
* OpenAI wire format — differences live in config, not code, so a new
|
|
13
|
+
* one is an AiModel row + credentials entry with no factory change.)
|
|
6
14
|
*/
|
|
7
15
|
import type { BaseExecutorConfig } from './types.js';
|
|
8
16
|
import type BaseExecutor from './BaseExecutor.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executorFactory.d.ts","sourceRoot":"","sources":["../src/executorFactory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"executorFactory.d.ts","sourceRoot":"","sources":["../src/executorFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAElD,wBAAsB,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAuDtF"}
|
package/dist/executorFactory.js
CHANGED
|
@@ -2,12 +2,20 @@
|
|
|
2
2
|
* Executor Factory
|
|
3
3
|
*
|
|
4
4
|
* Creates provider-specific executor instances from a v2 PromptManifest.
|
|
5
|
-
*
|
|
5
|
+
* Adapter families:
|
|
6
|
+
* - anthropic → AnthropicExecutor
|
|
7
|
+
* - openai → OpenAIExecutor
|
|
8
|
+
* - google / gemini → GoogleExecutor
|
|
9
|
+
* - bedrock → BedrockExecutor
|
|
10
|
+
* - openai-compatible → OpenAICompatibleExecutor
|
|
11
|
+
* (together, fireworks, deepinfra, deepseek, and any host that speaks the
|
|
12
|
+
* OpenAI wire format — differences live in config, not code, so a new
|
|
13
|
+
* one is an AiModel row + credentials entry with no factory change.)
|
|
6
14
|
*/
|
|
7
15
|
import AnthropicExecutor from './providers/anthropic.js';
|
|
8
16
|
import OpenAIExecutor from './providers/openai.js';
|
|
9
17
|
import BedrockExecutor from './providers/bedrock.js';
|
|
10
|
-
import
|
|
18
|
+
import OpenAICompatibleExecutor, { OPENAI_COMPATIBLE_PROVIDERS, } from './providers/openaiCompatible.js';
|
|
11
19
|
import GoogleExecutor from './providers/google.js';
|
|
12
20
|
export async function createExecutor(config) {
|
|
13
21
|
const { manifest, log = console.log } = config;
|
|
@@ -22,7 +30,12 @@ export async function createExecutor(config) {
|
|
|
22
30
|
if (!provider)
|
|
23
31
|
throw new Error('[executorFactory] manifest.spec.models[0].provider is required');
|
|
24
32
|
const configWithFactory = { ...config, executorFactory: createExecutor };
|
|
25
|
-
|
|
33
|
+
const providerKey = provider.toLowerCase();
|
|
34
|
+
// Native providers first — a native provider always wins, even if its model
|
|
35
|
+
// config happens to carry metadata.baseURL (that field is the escape hatch
|
|
36
|
+
// for UNKNOWN openai-compatible hosts below, and must not divert an
|
|
37
|
+
// Anthropic/Google/Bedrock call into the OpenAI-wire adapter).
|
|
38
|
+
switch (providerKey) {
|
|
26
39
|
case 'anthropic':
|
|
27
40
|
log(`[executorFactory] Creating Anthropic executor: ${primaryModel.model}`);
|
|
28
41
|
return new AnthropicExecutor(configWithFactory);
|
|
@@ -32,15 +45,22 @@ export async function createExecutor(config) {
|
|
|
32
45
|
case 'bedrock':
|
|
33
46
|
log(`[executorFactory] Creating Bedrock executor: ${primaryModel.model}`);
|
|
34
47
|
return new BedrockExecutor(configWithFactory);
|
|
35
|
-
case 'deepseek':
|
|
36
|
-
log(`[executorFactory] Creating DeepSeek executor: ${primaryModel.model}`);
|
|
37
|
-
return new DeepSeekExecutor(configWithFactory);
|
|
38
48
|
case 'google':
|
|
39
49
|
case 'gemini':
|
|
40
50
|
log(`[executorFactory] Creating Google executor: ${primaryModel.model}`);
|
|
41
51
|
return new GoogleExecutor(configWithFactory);
|
|
42
|
-
default:
|
|
43
|
-
throw new Error(`[executorFactory] Unsupported provider: ${provider}`);
|
|
44
52
|
}
|
|
53
|
+
// OpenAI-compatible family: known open-model hosts (together, fireworks,
|
|
54
|
+
// deepinfra, deepseek), the explicit 'openai-compatible' alias, or any other
|
|
55
|
+
// provider that supplies a baseURL via model metadata (config-only new
|
|
56
|
+
// provider, no factory change needed).
|
|
57
|
+
if (OPENAI_COMPATIBLE_PROVIDERS.has(providerKey) ||
|
|
58
|
+
providerKey === 'openai-compatible' ||
|
|
59
|
+
providerKey === 'openai_compatible' ||
|
|
60
|
+
primaryModel.metadata?.baseURL) {
|
|
61
|
+
log(`[executorFactory] Creating OpenAI-compatible executor (${providerKey}): ${primaryModel.model}`);
|
|
62
|
+
return new OpenAICompatibleExecutor(configWithFactory);
|
|
63
|
+
}
|
|
64
|
+
throw new Error(`[executorFactory] Unsupported provider: ${provider}`);
|
|
45
65
|
}
|
|
46
66
|
//# sourceMappingURL=executorFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executorFactory.js","sourceRoot":"","sources":["../src/executorFactory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"executorFactory.js","sourceRoot":"","sources":["../src/executorFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,wBAAwB,EAAE,EAC/B,2BAA2B,GAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAInD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAA0B;IAC7D,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;IAE/C,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAEzE,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,IAAI,CAAC,IAAI,EAAE,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IAEjG,MAAM,iBAAiB,GAAuB,EAAE,GAAG,MAAM,EAAE,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from './ImageCache.js';
|
|
|
11
11
|
export { default as AnthropicExecutor } from './providers/anthropic.js';
|
|
12
12
|
export { default as OpenAIExecutor } from './providers/openai.js';
|
|
13
13
|
export { default as BedrockExecutor } from './providers/bedrock.js';
|
|
14
|
-
export { default as
|
|
14
|
+
export { default as OpenAICompatibleExecutor, OPENAI_COMPATIBLE_BASE_URLS, OPENAI_COMPATIBLE_PROVIDERS } from './providers/openaiCompatible.js';
|
|
15
|
+
export { default as DeepSeekExecutor } from './providers/openaiCompatible.js';
|
|
15
16
|
export { default as GoogleExecutor } from './providers/google.js';
|
|
16
17
|
export { evaluateCondition } from './conditions.js';
|
|
17
18
|
export { SYSTEM_TOOL_NAMES } from './systemTools.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGnG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KA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AAS,EACT,aAAa,EACb,aAAa,EAEb,SAAS,EACT,aAAa,EACb,iBAAiB,EAEjB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAEhB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,UAAU,EACX,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,9 @@ export { default as ImageCache } from './ImageCache.js';
|
|
|
14
14
|
export { default as AnthropicExecutor } from './providers/anthropic.js';
|
|
15
15
|
export { default as OpenAIExecutor } from './providers/openai.js';
|
|
16
16
|
export { default as BedrockExecutor } from './providers/bedrock.js';
|
|
17
|
-
export { default as
|
|
17
|
+
export { default as OpenAICompatibleExecutor, OPENAI_COMPATIBLE_BASE_URLS, OPENAI_COMPATIBLE_PROVIDERS } from './providers/openaiCompatible.js';
|
|
18
|
+
// Back-compat alias: DeepSeek is now served by the shared openai-compatible adapter.
|
|
19
|
+
export { default as DeepSeekExecutor } from './providers/openaiCompatible.js';
|
|
18
20
|
export { default as GoogleExecutor } from './providers/google.js';
|
|
19
21
|
// ── Condition evaluation ──────────────────────────────────────────────────────
|
|
20
22
|
export { evaluateCondition } from './conditions.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,gFAAgF;AAChF,OAAO,EAAE,YAAY,EAAoD,MAAM,mBAAmB,CAAC;AAEnG,gFAAgF;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EA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AE,YAAY,EAAoC,MAAM,YAAY,CAAC;AAE5E,gFAAgF;AAChF,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GAIpB,MAAM,sBAAsB,CAAC;AAE9B,iFAAiF;AACjF,OAAO,EAAE,aAAa,EAA0C,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* DeepSeekExecutor -
|
|
2
|
+
* DeepSeekExecutor — back-compat shim.
|
|
3
3
|
*
|
|
4
|
-
* DeepSeek
|
|
4
|
+
* DeepSeek is an OpenAI-compatible provider and is now served by the shared
|
|
5
|
+
* OpenAICompatibleExecutor (see ./openaiCompatible.ts), which — unlike the old
|
|
6
|
+
* standalone DeepSeek adapter — also captures automatic cache-read tokens from
|
|
7
|
+
* usage cached_tokens and streams responses with an idle timeout. This file
|
|
8
|
+
* remains only so existing direct imports of './providers/deepseek.js' resolve.
|
|
5
9
|
*/
|
|
6
|
-
|
|
7
|
-
import type { BaseExecutorConfig, Message, InvokeOptions, InvokeResult } from '../types.js';
|
|
8
|
-
export default class DeepSeekExecutor extends BaseExecutor {
|
|
9
|
-
#private;
|
|
10
|
-
private client;
|
|
11
|
-
constructor(config: BaseExecutorConfig);
|
|
12
|
-
/**
|
|
13
|
-
* Invoke DeepSeek API
|
|
14
|
-
* Returns: { message: { role, content, tool_calls }, usage: { input_tokens, output_tokens } }
|
|
15
|
-
*/
|
|
16
|
-
invoke(messages: Message[], options?: InvokeOptions): Promise<InvokeResult>;
|
|
17
|
-
/**
|
|
18
|
-
* Check if message has tool calls
|
|
19
|
-
*/
|
|
20
|
-
hasToolCalls(message: Message): boolean;
|
|
21
|
-
}
|
|
10
|
+
export { default, OPENAI_COMPATIBLE_BASE_URLS, OPENAI_COMPATIBLE_PROVIDERS } from './openaiCompatible.js';
|
|
22
11
|
//# sourceMappingURL=deepseek.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepseek.d.ts","sourceRoot":"","sources":["../../src/providers/deepseek.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deepseek.d.ts","sourceRoot":"","sources":["../../src/providers/deepseek.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,213 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* DeepSeekExecutor -
|
|
2
|
+
* DeepSeekExecutor — back-compat shim.
|
|
3
3
|
*
|
|
4
|
-
* DeepSeek
|
|
4
|
+
* DeepSeek is an OpenAI-compatible provider and is now served by the shared
|
|
5
|
+
* OpenAICompatibleExecutor (see ./openaiCompatible.ts), which — unlike the old
|
|
6
|
+
* standalone DeepSeek adapter — also captures automatic cache-read tokens from
|
|
7
|
+
* usage cached_tokens and streams responses with an idle timeout. This file
|
|
8
|
+
* remains only so existing direct imports of './providers/deepseek.js' resolve.
|
|
5
9
|
*/
|
|
6
|
-
|
|
7
|
-
import BaseExecutor from '../BaseExecutor.js';
|
|
8
|
-
import { streamWithRetry, consumeOpenAIStream, STREAM_ABSOLUTE_BACKSTOP_MS } from './streaming.js';
|
|
9
|
-
export default class DeepSeekExecutor extends BaseExecutor {
|
|
10
|
-
client;
|
|
11
|
-
constructor(config) {
|
|
12
|
-
super(config);
|
|
13
|
-
// Get DeepSeek credentials
|
|
14
|
-
const deepseekCreds = this.credentials.deepseek;
|
|
15
|
-
if (!deepseekCreds) {
|
|
16
|
-
throw new Error('[DeepSeekExecutor] credentials.deepseek is required');
|
|
17
|
-
}
|
|
18
|
-
if (!deepseekCreds.apiKey) {
|
|
19
|
-
throw new Error('[DeepSeekExecutor] credentials.deepseek.apiKey is required');
|
|
20
|
-
}
|
|
21
|
-
// Initialize DeepSeek client (OpenAI-compatible)
|
|
22
|
-
this.client = new OpenAI({
|
|
23
|
-
apiKey: deepseekCreds.apiKey,
|
|
24
|
-
baseURL: 'https://api.deepseek.com/v1',
|
|
25
|
-
// Absorb transient rate-limit (429) / 5xx / timeout spikes at the SDK
|
|
26
|
-
// layer with exponential backoff before the executor's model-fallback
|
|
27
|
-
// path. SDK default is 2; bump so a brief blip doesn't fail the run.
|
|
28
|
-
// `invoke()` STREAMS and bounds the response with an inter-chunk IDLE
|
|
29
|
-
// timeout, so a long-but-progressing turn never times out. The client
|
|
30
|
-
// `timeout` is only the SDK's own total-request cap; set it to the
|
|
31
|
-
// streaming absolute backstop — the idle timeout is the operative ceiling.
|
|
32
|
-
maxRetries: 3,
|
|
33
|
-
timeout: STREAM_ABSOLUTE_BACKSTOP_MS,
|
|
34
|
-
dangerouslyAllowBrowser: deepseekCreds.dangerouslyAllowBrowser
|
|
35
|
-
});
|
|
36
|
-
this.log(`[DeepSeekExecutor] Initialized with model: ${this.model}`);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Invoke DeepSeek API
|
|
40
|
-
* Returns: { message: { role, content, tool_calls }, usage: { input_tokens, output_tokens } }
|
|
41
|
-
*/
|
|
42
|
-
async invoke(messages, options = {}) {
|
|
43
|
-
// Build request parameters
|
|
44
|
-
const params = {
|
|
45
|
-
model: this.model,
|
|
46
|
-
messages: this.#formatMessages(messages),
|
|
47
|
-
};
|
|
48
|
-
// Add all provider-specific parameters from model config
|
|
49
|
-
const providerParams = this.#extractProviderParams();
|
|
50
|
-
Object.assign(params, providerParams);
|
|
51
|
-
// Add tools if provided
|
|
52
|
-
if (options.tools && options.tools.length > 0) {
|
|
53
|
-
params.tools = options.tools.map(t => this.#formatTool(t));
|
|
54
|
-
}
|
|
55
|
-
// Add tool_choice if specified
|
|
56
|
-
if (options.tool_choice && options.tool_choice !== 'auto') {
|
|
57
|
-
params.tool_choice = this.#formatToolChoice(options.tool_choice);
|
|
58
|
-
}
|
|
59
|
-
this.log('[DeepSeekExecutor] Invoking:', {
|
|
60
|
-
model: params.model,
|
|
61
|
-
temperature: params.temperature,
|
|
62
|
-
top_p: params.top_p,
|
|
63
|
-
tools: params.tools?.length || 0
|
|
64
|
-
});
|
|
65
|
-
// Call DeepSeek API (OpenAI-compatible) — STREAMED. Reassemble the streamed
|
|
66
|
-
// deltas back into the non-streamed completion shape so the extraction below
|
|
67
|
-
// is unchanged; idle-timer bump per chunk, whole-prompt retry on failure.
|
|
68
|
-
const response = await streamWithRetry(async (guard) => {
|
|
69
|
-
const stream = await this.client.chat.completions.create({ ...params, stream: true, stream_options: { include_usage: true } }, { signal: guard.signal });
|
|
70
|
-
return await consumeOpenAIStream(stream, () => guard.bump());
|
|
71
|
-
}, {
|
|
72
|
-
externalSignal: options.signal,
|
|
73
|
-
isRetryable: (err) => this.isRetryableError(err),
|
|
74
|
-
log: (m) => this.log(m),
|
|
75
|
-
});
|
|
76
|
-
const choice = response.choices[0];
|
|
77
|
-
const message = choice.message;
|
|
78
|
-
// Format response to match expected structure
|
|
79
|
-
return {
|
|
80
|
-
message: {
|
|
81
|
-
role: message.role,
|
|
82
|
-
content: message.content || '',
|
|
83
|
-
tool_calls: this.#extractToolCalls(message.tool_calls)
|
|
84
|
-
},
|
|
85
|
-
usage: {
|
|
86
|
-
input_tokens: response.usage?.prompt_tokens ?? 0,
|
|
87
|
-
output_tokens: response.usage?.completion_tokens ?? 0
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Check if message has tool calls
|
|
93
|
-
*/
|
|
94
|
-
hasToolCalls(message) {
|
|
95
|
-
return Boolean(message?.tool_calls && message.tool_calls.length > 0);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Format messages for DeepSeek API (OpenAI format)
|
|
99
|
-
*/
|
|
100
|
-
#formatMessages(messages) {
|
|
101
|
-
return messages.map(msg => {
|
|
102
|
-
// Handle tool messages
|
|
103
|
-
if (msg.role === 'tool') {
|
|
104
|
-
return {
|
|
105
|
-
role: 'tool',
|
|
106
|
-
tool_call_id: msg.tool_call_id,
|
|
107
|
-
content: msg.content
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
// Handle regular messages
|
|
111
|
-
return {
|
|
112
|
-
role: msg.role,
|
|
113
|
-
content: msg.content
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Format tool definition for DeepSeek (OpenAI format)
|
|
119
|
-
*/
|
|
120
|
-
#formatTool(tool) {
|
|
121
|
-
// Already in OpenAI format: { type: "function", function: { name, description, parameters } }
|
|
122
|
-
if (tool.type === 'function' && tool.function) {
|
|
123
|
-
return tool;
|
|
124
|
-
}
|
|
125
|
-
// If has function field but no type (partial OpenAI format)
|
|
126
|
-
if (tool.function) {
|
|
127
|
-
return {
|
|
128
|
-
type: 'function',
|
|
129
|
-
function: tool.function
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
// Anthropic format: { name, description, input_schema } - convert to OpenAI
|
|
133
|
-
if (tool.input_schema) {
|
|
134
|
-
return {
|
|
135
|
-
type: 'function',
|
|
136
|
-
function: {
|
|
137
|
-
name: tool.name,
|
|
138
|
-
description: tool.description || '',
|
|
139
|
-
parameters: tool.input_schema
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
// Studio format: { name, description, parameters } - convert to OpenAI format
|
|
144
|
-
if (tool.parameters) {
|
|
145
|
-
return {
|
|
146
|
-
type: 'function',
|
|
147
|
-
function: {
|
|
148
|
-
name: tool.name,
|
|
149
|
-
description: tool.description || '',
|
|
150
|
-
parameters: tool.parameters
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
// Fallback: wrap in OpenAI format
|
|
155
|
-
this.log('[DeepSeekExecutor] Warning: Unrecognized tool format:', JSON.stringify(tool));
|
|
156
|
-
return {
|
|
157
|
-
type: 'function',
|
|
158
|
-
function: {
|
|
159
|
-
name: tool.name || 'unknown',
|
|
160
|
-
description: tool.description || '',
|
|
161
|
-
parameters: tool.parameters || tool.input_schema || { type: 'object', properties: {} }
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Format tool_choice for DeepSeek (OpenAI format)
|
|
167
|
-
*/
|
|
168
|
-
#formatToolChoice(toolChoice) {
|
|
169
|
-
if (typeof toolChoice === 'string') {
|
|
170
|
-
// "required" or "any" -> "required". Parallel tool calls stay enabled
|
|
171
|
-
// (OpenAI-compatible default — nothing here disables them).
|
|
172
|
-
if (toolChoice === 'required' || toolChoice === 'any') {
|
|
173
|
-
return 'required';
|
|
174
|
-
}
|
|
175
|
-
return 'auto';
|
|
176
|
-
}
|
|
177
|
-
// If it's a specific tool: { type: "function", function: { name: "..." } }
|
|
178
|
-
if (toolChoice.type === 'function' || toolChoice.function?.name) {
|
|
179
|
-
return toolChoice;
|
|
180
|
-
}
|
|
181
|
-
// Anthropic format: { type: "tool", name: "..." }
|
|
182
|
-
if (toolChoice.type === 'tool' && toolChoice.name) {
|
|
183
|
-
return {
|
|
184
|
-
type: 'function',
|
|
185
|
-
function: { name: toolChoice.name }
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
return 'auto';
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Extract tool calls from DeepSeek response (OpenAI format)
|
|
192
|
-
*/
|
|
193
|
-
#extractToolCalls(toolCalls) {
|
|
194
|
-
if (!toolCalls || toolCalls.length === 0) {
|
|
195
|
-
return [];
|
|
196
|
-
}
|
|
197
|
-
return toolCalls.map(tc => ({
|
|
198
|
-
id: tc.id,
|
|
199
|
-
name: tc.function.name,
|
|
200
|
-
args: JSON.parse(tc.function.arguments)
|
|
201
|
-
}));
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Extract provider-specific parameters from model config
|
|
205
|
-
* Excludes displayName, passes rest to DeepSeek API
|
|
206
|
-
*/
|
|
207
|
-
#extractProviderParams() {
|
|
208
|
-
const metadata = this.primaryModelConfig.metadata || {};
|
|
209
|
-
const { displayName, ...providerParams } = metadata;
|
|
210
|
-
return providerParams;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
10
|
+
export { default, OPENAI_COMPATIBLE_BASE_URLS, OPENAI_COMPATIBLE_PROVIDERS } from './openaiCompatible.js';
|
|
213
11
|
//# sourceMappingURL=deepseek.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepseek.js","sourceRoot":"","sources":["../../src/providers/deepseek.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deepseek.js","sourceRoot":"","sources":["../../src/providers/deepseek.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAICompatibleExecutor — shared adapter for OpenAI-compatible providers
|
|
3
|
+
*
|
|
4
|
+
* One adapter for every provider that speaks the OpenAI Chat Completions wire
|
|
5
|
+
* format: Together AI (Kimi / Qwen), Fireworks, DeepInfra, DeepSeek, and any
|
|
6
|
+
* future open-model host. Per-provider differences — base URL, credentials,
|
|
7
|
+
* model IDs, pricing, cache behavior — live in CONFIG, never in code:
|
|
8
|
+
*
|
|
9
|
+
* - baseURL: resolved from OPENAI_COMPATIBLE_BASE_URLS[provider], overridable
|
|
10
|
+
* by credentials[provider].baseURL or model metadata.baseURL.
|
|
11
|
+
* - apiKey: credentials[provider].apiKey (via the existing secret manager;
|
|
12
|
+
* never stored in manifest/config rows).
|
|
13
|
+
* - model: manifest.spec.models[].model.
|
|
14
|
+
* - params: manifest.spec.models[].metadata (temperature, top_p, …).
|
|
15
|
+
*
|
|
16
|
+
* Adding a new OpenAI-compatible provider is therefore a config + credentials
|
|
17
|
+
* change (new AiModel row + creds entry), with no new adapter code required —
|
|
18
|
+
* unless it needs a base URL we don't know, which is a one-line registry entry.
|
|
19
|
+
*
|
|
20
|
+
* CACHING: these providers do AUTOMATIC (best-effort) prefix caching — the
|
|
21
|
+
* provider caches transparently, there is no billed cache write, and cached
|
|
22
|
+
* reads are reported back in usage.prompt_tokens_details.cached_tokens. We map
|
|
23
|
+
* that to cache_read_input_tokens and leave cache_creation_input_tokens at 0
|
|
24
|
+
* (there is no write concept here; the backend renders it as "—" / null based
|
|
25
|
+
* on the model's cacheMode). We never send Anthropic-style cache_control blocks
|
|
26
|
+
* — they are not part of the OpenAI wire format and must not leak through.
|
|
27
|
+
*/
|
|
28
|
+
import BaseExecutor from '../BaseExecutor.js';
|
|
29
|
+
import type { BaseExecutorConfig, Message, InvokeOptions, InvokeResult } from '../types.js';
|
|
30
|
+
/** Known OpenAI-compatible provider base URLs. A provider not listed here is
|
|
31
|
+
* still usable by supplying baseURL via credentials or model metadata. */
|
|
32
|
+
export declare const OPENAI_COMPATIBLE_BASE_URLS: Record<string, string>;
|
|
33
|
+
/** Providers routed through this adapter. Keep in sync with executorFactory. */
|
|
34
|
+
export declare const OPENAI_COMPATIBLE_PROVIDERS: Set<string>;
|
|
35
|
+
export default class OpenAICompatibleExecutor extends BaseExecutor {
|
|
36
|
+
#private;
|
|
37
|
+
private client;
|
|
38
|
+
private providerName;
|
|
39
|
+
constructor(config: BaseExecutorConfig);
|
|
40
|
+
/**
|
|
41
|
+
* Invoke the OpenAI-compatible API.
|
|
42
|
+
* Returns: { message: { role, content, tool_calls }, usage: {...disjoint buckets} }
|
|
43
|
+
*/
|
|
44
|
+
invoke(messages: Message[], options?: InvokeOptions): Promise<InvokeResult>;
|
|
45
|
+
hasToolCalls(message: Message): boolean;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=openaiCompatible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openaiCompatible.d.ts","sourceRoot":"","sources":["../../src/providers/openaiCompatible.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG5F;2EAC2E;AAC3E,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAK9D,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,2BAA2B,aAAoD,CAAC;AAE7F,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,YAAY;;IAChE,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,YAAY,CAAS;gBAEjB,MAAM,EAAE,kBAAkB;IAgDtC;;;OAGG;IACG,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqGrF,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;CAwExC"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAICompatibleExecutor — shared adapter for OpenAI-compatible providers
|
|
3
|
+
*
|
|
4
|
+
* One adapter for every provider that speaks the OpenAI Chat Completions wire
|
|
5
|
+
* format: Together AI (Kimi / Qwen), Fireworks, DeepInfra, DeepSeek, and any
|
|
6
|
+
* future open-model host. Per-provider differences — base URL, credentials,
|
|
7
|
+
* model IDs, pricing, cache behavior — live in CONFIG, never in code:
|
|
8
|
+
*
|
|
9
|
+
* - baseURL: resolved from OPENAI_COMPATIBLE_BASE_URLS[provider], overridable
|
|
10
|
+
* by credentials[provider].baseURL or model metadata.baseURL.
|
|
11
|
+
* - apiKey: credentials[provider].apiKey (via the existing secret manager;
|
|
12
|
+
* never stored in manifest/config rows).
|
|
13
|
+
* - model: manifest.spec.models[].model.
|
|
14
|
+
* - params: manifest.spec.models[].metadata (temperature, top_p, …).
|
|
15
|
+
*
|
|
16
|
+
* Adding a new OpenAI-compatible provider is therefore a config + credentials
|
|
17
|
+
* change (new AiModel row + creds entry), with no new adapter code required —
|
|
18
|
+
* unless it needs a base URL we don't know, which is a one-line registry entry.
|
|
19
|
+
*
|
|
20
|
+
* CACHING: these providers do AUTOMATIC (best-effort) prefix caching — the
|
|
21
|
+
* provider caches transparently, there is no billed cache write, and cached
|
|
22
|
+
* reads are reported back in usage.prompt_tokens_details.cached_tokens. We map
|
|
23
|
+
* that to cache_read_input_tokens and leave cache_creation_input_tokens at 0
|
|
24
|
+
* (there is no write concept here; the backend renders it as "—" / null based
|
|
25
|
+
* on the model's cacheMode). We never send Anthropic-style cache_control blocks
|
|
26
|
+
* — they are not part of the OpenAI wire format and must not leak through.
|
|
27
|
+
*/
|
|
28
|
+
import OpenAI from 'openai';
|
|
29
|
+
import BaseExecutor from '../BaseExecutor.js';
|
|
30
|
+
import { streamWithRetry, consumeOpenAIStream, STREAM_ABSOLUTE_BACKSTOP_MS } from './streaming.js';
|
|
31
|
+
/** Known OpenAI-compatible provider base URLs. A provider not listed here is
|
|
32
|
+
* still usable by supplying baseURL via credentials or model metadata. */
|
|
33
|
+
export const OPENAI_COMPATIBLE_BASE_URLS = {
|
|
34
|
+
together: 'https://api.together.ai/v1',
|
|
35
|
+
fireworks: 'https://api.fireworks.ai/inference/v1',
|
|
36
|
+
deepinfra: 'https://api.deepinfra.com/v1/openai',
|
|
37
|
+
deepseek: 'https://api.deepseek.com/v1',
|
|
38
|
+
};
|
|
39
|
+
/** Providers routed through this adapter. Keep in sync with executorFactory. */
|
|
40
|
+
export const OPENAI_COMPATIBLE_PROVIDERS = new Set(Object.keys(OPENAI_COMPATIBLE_BASE_URLS));
|
|
41
|
+
export default class OpenAICompatibleExecutor extends BaseExecutor {
|
|
42
|
+
client;
|
|
43
|
+
providerName;
|
|
44
|
+
constructor(config) {
|
|
45
|
+
super(config);
|
|
46
|
+
// this.provider is set by BaseExecutor from the selected model config.
|
|
47
|
+
this.providerName = (this.provider || '').toLowerCase();
|
|
48
|
+
// Credentials are keyed by provider name. Real provider strings are
|
|
49
|
+
// lowercase ('together', 'deepseek'), but tolerate the original casing too.
|
|
50
|
+
const credMap = this.credentials;
|
|
51
|
+
const creds = credMap[this.provider] ?? credMap[this.providerName];
|
|
52
|
+
if (!creds) {
|
|
53
|
+
throw new Error(`[OpenAICompatibleExecutor] credentials.${this.providerName} is required`);
|
|
54
|
+
}
|
|
55
|
+
if (!creds.apiKey) {
|
|
56
|
+
throw new Error(`[OpenAICompatibleExecutor] credentials.${this.providerName}.apiKey is required`);
|
|
57
|
+
}
|
|
58
|
+
// baseURL resolution order: creds override → model metadata → registry.
|
|
59
|
+
const metadata = (this.primaryModelConfig.metadata || {});
|
|
60
|
+
const baseURL = creds.baseURL ||
|
|
61
|
+
metadata.baseURL ||
|
|
62
|
+
OPENAI_COMPATIBLE_BASE_URLS[this.providerName];
|
|
63
|
+
if (!baseURL) {
|
|
64
|
+
throw new Error(`[OpenAICompatibleExecutor] no baseURL for provider "${this.providerName}" — ` +
|
|
65
|
+
`add one to OPENAI_COMPATIBLE_BASE_URLS, credentials.${this.providerName}.baseURL, or model metadata.baseURL`);
|
|
66
|
+
}
|
|
67
|
+
// Initialize OpenAI-compatible client. invoke() STREAMS and bounds the
|
|
68
|
+
// response with an inter-chunk IDLE timeout (see streaming.ts), so a
|
|
69
|
+
// long-but-progressing turn — exactly Kimi doing multi-tool agentic work —
|
|
70
|
+
// never races a total-completion timeout. The client `timeout` here is only
|
|
71
|
+
// the SDK's own absolute request cap; set it to the streaming backstop and
|
|
72
|
+
// let the idle timeout be the operative ceiling. maxRetries matches the
|
|
73
|
+
// other streamed adapters.
|
|
74
|
+
this.client = new OpenAI({
|
|
75
|
+
apiKey: creds.apiKey,
|
|
76
|
+
baseURL,
|
|
77
|
+
maxRetries: 3,
|
|
78
|
+
timeout: STREAM_ABSOLUTE_BACKSTOP_MS,
|
|
79
|
+
dangerouslyAllowBrowser: creds.dangerouslyAllowBrowser,
|
|
80
|
+
});
|
|
81
|
+
this.log(`[OpenAICompatibleExecutor] Initialized ${this.providerName} @ ${baseURL} with model: ${this.model}`);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Invoke the OpenAI-compatible API.
|
|
85
|
+
* Returns: { message: { role, content, tool_calls }, usage: {...disjoint buckets} }
|
|
86
|
+
*/
|
|
87
|
+
async invoke(messages, options = {}) {
|
|
88
|
+
const params = {
|
|
89
|
+
model: this.model,
|
|
90
|
+
messages: this.#formatMessages(messages),
|
|
91
|
+
};
|
|
92
|
+
// Pass through provider-specific params from model config (temperature, top_p, …).
|
|
93
|
+
Object.assign(params, this.#extractProviderParams());
|
|
94
|
+
if (options.tools && options.tools.length > 0) {
|
|
95
|
+
params.tools = options.tools.map(t => this.#formatTool(t));
|
|
96
|
+
// Explicit parallel tool calls — OpenAI-compatible default; set so it
|
|
97
|
+
// can't silently regress and matches parallel behavior across providers.
|
|
98
|
+
params.parallel_tool_calls = true;
|
|
99
|
+
}
|
|
100
|
+
if (options.tool_choice && options.tool_choice !== 'auto') {
|
|
101
|
+
params.tool_choice = this.#formatToolChoice(options.tool_choice);
|
|
102
|
+
}
|
|
103
|
+
this.log(`[OpenAICompatibleExecutor:${this.providerName}] Invoking:`, {
|
|
104
|
+
model: params.model,
|
|
105
|
+
temperature: params.temperature,
|
|
106
|
+
top_p: params.top_p,
|
|
107
|
+
tools: params.tools?.length || 0,
|
|
108
|
+
});
|
|
109
|
+
// STREAMED: consumeOpenAIStream reassembles content + tool_call arg deltas
|
|
110
|
+
// back into the exact non-streamed completion shape, so the extraction below
|
|
111
|
+
// is unchanged. Each chunk bumps the idle timer; a transient failure retries
|
|
112
|
+
// the whole prompt. stream_options.include_usage rides usage on the final
|
|
113
|
+
// chunk (guarded below — not all OpenAI-compatible hosts honor it).
|
|
114
|
+
const response = await streamWithRetry(async (guard) => {
|
|
115
|
+
const stream = await this.client.chat.completions.create({ ...params, stream: true, stream_options: { include_usage: true } }, { signal: guard.signal });
|
|
116
|
+
return await consumeOpenAIStream(stream, () => guard.bump());
|
|
117
|
+
}, {
|
|
118
|
+
externalSignal: options.signal,
|
|
119
|
+
isRetryable: (err) => this.isRetryableError(err),
|
|
120
|
+
log: (m) => this.log(m),
|
|
121
|
+
});
|
|
122
|
+
const choice = response.choices[0];
|
|
123
|
+
const message = choice.message;
|
|
124
|
+
// Automatic-cache providers report cached prefix tokens as a SUBSET of
|
|
125
|
+
// prompt_tokens (same convention as OpenAI direct). We subtract them out so
|
|
126
|
+
// input_tokens is the UNCACHED count and the four usage buckets stay
|
|
127
|
+
// disjoint across providers — otherwise cached reads get billed twice (once
|
|
128
|
+
// as input, once as read). cache_creation is 0: these providers have no
|
|
129
|
+
// billed write concept.
|
|
130
|
+
//
|
|
131
|
+
// Field location is NOT consistent across OpenAI-compatible hosts. Read all
|
|
132
|
+
// known spellings so a cache hit is never silently missed (a missed field
|
|
133
|
+
// reads as 0% hit rate → ~5x cost on our cache-heavy workload, and fails
|
|
134
|
+
// silently — the spec's highest-risk case):
|
|
135
|
+
// - OpenAI direct / Together dedicated-inference: nested
|
|
136
|
+
// prompt_tokens_details.cached_tokens
|
|
137
|
+
// - Together OpenAI-compat surface: top-level cached_tokens
|
|
138
|
+
// - DeepSeek: prompt_cache_hit_tokens (with prompt_cache_miss_tokens)
|
|
139
|
+
// All three are a SUBSET of prompt_tokens, so subtracting keeps input
|
|
140
|
+
// uncached. NOTE: prompt_tokens-is-cache-inclusive must be confirmed with a
|
|
141
|
+
// live Together call; if a host reports cached ADDITIVELY, this subtraction
|
|
142
|
+
// under-counts input and needs a per-host flag.
|
|
143
|
+
const usageTyped = response.usage;
|
|
144
|
+
const cachedTokens = usageTyped?.prompt_tokens_details?.cached_tokens ??
|
|
145
|
+
usageTyped?.cached_tokens ??
|
|
146
|
+
usageTyped?.prompt_cache_hit_tokens ??
|
|
147
|
+
0;
|
|
148
|
+
// Streamed usage rides the final include_usage chunk. Real OpenAI/Together
|
|
149
|
+
// send it, but guard so a host that omits it yields 0s instead of a crash
|
|
150
|
+
// on response.usage!. If a host silently drops usage, cost → 0 and the
|
|
151
|
+
// credit engine under-bills — LIVE-VERIFY Together honors include_usage.
|
|
152
|
+
const promptTokens = response.usage?.prompt_tokens ?? 0;
|
|
153
|
+
const completionTokens = response.usage?.completion_tokens ?? 0;
|
|
154
|
+
return {
|
|
155
|
+
message: {
|
|
156
|
+
role: message.role,
|
|
157
|
+
content: message.content || '',
|
|
158
|
+
tool_calls: this.#extractToolCalls(message.tool_calls),
|
|
159
|
+
},
|
|
160
|
+
usage: {
|
|
161
|
+
input_tokens: Math.max(0, promptTokens - cachedTokens),
|
|
162
|
+
output_tokens: completionTokens,
|
|
163
|
+
cache_read_input_tokens: cachedTokens,
|
|
164
|
+
cache_creation_input_tokens: 0,
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
hasToolCalls(message) {
|
|
169
|
+
return Boolean(message?.tool_calls && message.tool_calls.length > 0);
|
|
170
|
+
}
|
|
171
|
+
/** Format messages for the OpenAI wire format. */
|
|
172
|
+
#formatMessages(messages) {
|
|
173
|
+
return messages.map(msg => {
|
|
174
|
+
if (msg.role === 'tool') {
|
|
175
|
+
return { role: 'tool', tool_call_id: msg.tool_call_id, content: msg.content };
|
|
176
|
+
}
|
|
177
|
+
return { role: msg.role, content: msg.content };
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/** Format a tool definition to OpenAI format from any of our known shapes. */
|
|
181
|
+
#formatTool(tool) {
|
|
182
|
+
if (tool.type === 'function' && tool.function)
|
|
183
|
+
return tool;
|
|
184
|
+
if (tool.function)
|
|
185
|
+
return { type: 'function', function: tool.function };
|
|
186
|
+
if (tool.input_schema) {
|
|
187
|
+
return {
|
|
188
|
+
type: 'function',
|
|
189
|
+
function: { name: tool.name, description: tool.description || '', parameters: tool.input_schema },
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
if (tool.parameters) {
|
|
193
|
+
return {
|
|
194
|
+
type: 'function',
|
|
195
|
+
function: { name: tool.name, description: tool.description || '', parameters: tool.parameters },
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
this.log(`[OpenAICompatibleExecutor:${this.providerName}] Warning: Unrecognized tool format:`, JSON.stringify(tool));
|
|
199
|
+
return {
|
|
200
|
+
type: 'function',
|
|
201
|
+
function: {
|
|
202
|
+
name: tool.name || 'unknown',
|
|
203
|
+
description: tool.description || '',
|
|
204
|
+
parameters: tool.parameters || tool.input_schema || { type: 'object', properties: {} },
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/** Format tool_choice to OpenAI format. */
|
|
209
|
+
#formatToolChoice(toolChoice) {
|
|
210
|
+
if (typeof toolChoice === 'string') {
|
|
211
|
+
if (toolChoice === 'required' || toolChoice === 'any')
|
|
212
|
+
return 'required';
|
|
213
|
+
return 'auto';
|
|
214
|
+
}
|
|
215
|
+
if (toolChoice.type === 'function' || toolChoice.function?.name)
|
|
216
|
+
return toolChoice;
|
|
217
|
+
// Anthropic format: { type: "tool", name: "..." }
|
|
218
|
+
if (toolChoice.type === 'tool' && toolChoice.name) {
|
|
219
|
+
return { type: 'function', function: { name: toolChoice.name } };
|
|
220
|
+
}
|
|
221
|
+
return 'auto';
|
|
222
|
+
}
|
|
223
|
+
/** Extract tool calls from an OpenAI-compatible response. */
|
|
224
|
+
#extractToolCalls(toolCalls) {
|
|
225
|
+
if (!toolCalls || toolCalls.length === 0)
|
|
226
|
+
return [];
|
|
227
|
+
return toolCalls.map(tc => ({
|
|
228
|
+
id: tc.id,
|
|
229
|
+
name: tc.function.name,
|
|
230
|
+
args: JSON.parse(tc.function.arguments),
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
/** Provider-specific params from model config metadata (excludes non-API keys). */
|
|
234
|
+
#extractProviderParams() {
|
|
235
|
+
const metadata = this.primaryModelConfig.metadata || {};
|
|
236
|
+
// Strip keys that are adapter config, not model-call params.
|
|
237
|
+
const { displayName, baseURL, cacheMode, quantization, ...providerParams } = metadata;
|
|
238
|
+
return providerParams;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=openaiCompatible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openaiCompatible.js","sourceRoot":"","sources":["../../src/providers/openaiCompatible.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAEnG;2EAC2E;AAC3E,MAAM,CAAC,MAAM,2BAA2B,GAA2B;IACjE,QAAQ,EAAG,4BAA4B;IACvC,SAAS,EAAE,uCAAuC;IAClD,SAAS,EAAE,qCAAqC;IAChD,QAAQ,EAAG,6BAA6B;CACzC,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC;AAE7F,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,YAAY;IACxD,MAAM,CAAS;IACf,YAAY,CAAS;IAE7B,YAAY,MAA0B;QACpC,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,uEAAuE;QACvE,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAExD,oEAAoE;QACpE,4EAA4E;QAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,WAAkC,CAAC;QACxD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnE,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ClD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;QACnE,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6DAA6D;IAC7D,iBAAiB,CAAC,SAA4B;QAC5C,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACpD,OAAO,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAC1B,EAAE,EAAE,EAAE,CAAC,EAAE;YACT,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI;YACtB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;SACxC,CAAC,CAAC,CAAC;IACN,CAAC;IAED,mFAAmF;IACnF,sBAAsB;QACpB,MAAM,QAAQ,GAAI,IAAI,CAAC,kBAA0B,CAAC,QAAQ,IAAI,EAAE,CAAC;QACjE,6DAA6D;QAC7D,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,cAAc,EAAE,GAAG,QAAQ,CAAC;QACtF,OAAO,cAAc,CAAC;IACxB,CAAC;CACF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -48,14 +48,21 @@ export interface ProviderCredentials {
|
|
|
48
48
|
accessKeyId?: string;
|
|
49
49
|
secretAccessKey?: string;
|
|
50
50
|
};
|
|
51
|
-
deepseek?:
|
|
52
|
-
apiKey: string;
|
|
53
|
-
dangerouslyAllowBrowser?: boolean;
|
|
54
|
-
};
|
|
51
|
+
deepseek?: OpenAICompatibleCredentials;
|
|
55
52
|
google?: {
|
|
56
53
|
apiKey: string;
|
|
57
54
|
dangerouslyAllowBrowser?: boolean;
|
|
58
55
|
};
|
|
56
|
+
together?: OpenAICompatibleCredentials;
|
|
57
|
+
fireworks?: OpenAICompatibleCredentials;
|
|
58
|
+
deepinfra?: OpenAICompatibleCredentials;
|
|
59
|
+
[provider: string]: any;
|
|
60
|
+
}
|
|
61
|
+
export interface OpenAICompatibleCredentials {
|
|
62
|
+
apiKey: string;
|
|
63
|
+
/** Override the provider registry / model-metadata base URL. */
|
|
64
|
+
baseURL?: string;
|
|
65
|
+
dangerouslyAllowBrowser?: boolean;
|
|
59
66
|
}
|
|
60
67
|
export interface ToolHandler {
|
|
61
68
|
execute: (args: any) => Promise<any>;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAC/C,OAAO,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB;;;;;oCAKgC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,QAA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