@probelabs/probe 0.6.0-rc332 → 0.6.0-rc335
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/bin/binaries/{probe-v0.6.0-rc332-aarch64-apple-darwin.tar.gz → probe-v0.6.0-rc335-aarch64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc332-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc335-aarch64-unknown-linux-musl.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc332-x86_64-apple-darwin.tar.gz → probe-v0.6.0-rc335-x86_64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc332-x86_64-pc-windows-msvc.zip → probe-v0.6.0-rc335-x86_64-pc-windows-msvc.zip} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc332-x86_64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc335-x86_64-unknown-linux-musl.tar.gz} +0 -0
- package/build/utils/provider.js +20 -4
- package/cjs/agent/ProbeAgent.cjs +2533 -68
- package/cjs/index.cjs +2533 -68
- package/package.json +2 -1
- package/src/utils/provider.js +20 -4
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build/utils/provider.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { createAnthropic } from '@ai-sdk/anthropic';
|
|
9
9
|
import { createOpenAI } from '@ai-sdk/openai';
|
|
10
|
+
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
|
|
10
11
|
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
11
12
|
import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock';
|
|
12
13
|
|
|
@@ -30,12 +31,27 @@ export function createProviderInstance(config) {
|
|
|
30
31
|
...(config.baseURL && { baseURL: config.baseURL })
|
|
31
32
|
});
|
|
32
33
|
|
|
33
|
-
case 'openai':
|
|
34
|
-
|
|
34
|
+
case 'openai': {
|
|
35
|
+
if (config.baseURL) {
|
|
36
|
+
// Non-OpenAI endpoints (Fireworks, etc.) — use openai-compatible provider
|
|
37
|
+
// which correctly handles reasoning_content in streaming deltas
|
|
38
|
+
const provider = createOpenAICompatible({
|
|
39
|
+
name: 'openai-compatible',
|
|
40
|
+
baseURL: config.baseURL,
|
|
41
|
+
apiKey: config.apiKey,
|
|
42
|
+
});
|
|
43
|
+
return provider;
|
|
44
|
+
}
|
|
45
|
+
const openai = createOpenAI({
|
|
35
46
|
compatibility: 'strict',
|
|
36
47
|
apiKey: config.apiKey,
|
|
37
|
-
...(config.baseURL && { baseURL: config.baseURL })
|
|
38
48
|
});
|
|
49
|
+
const chatProvider = (modelId, settings) => openai.chat(modelId, settings);
|
|
50
|
+
chatProvider.chat = openai.chat.bind(openai);
|
|
51
|
+
chatProvider.responses = openai.responses.bind(openai);
|
|
52
|
+
chatProvider.languageModel = openai.languageModel.bind(openai);
|
|
53
|
+
return chatProvider;
|
|
54
|
+
}
|
|
39
55
|
|
|
40
56
|
case 'google':
|
|
41
57
|
return createGoogleGenerativeAI({
|
|
@@ -97,7 +113,7 @@ export function resolveBaseUrl(providerName) {
|
|
|
97
113
|
case 'anthropic':
|
|
98
114
|
return process.env.ANTHROPIC_API_URL || process.env.ANTHROPIC_BASE_URL || llmBaseUrl;
|
|
99
115
|
case 'openai':
|
|
100
|
-
return process.env.OPENAI_API_URL || llmBaseUrl;
|
|
116
|
+
return process.env.OPENAI_API_URL || process.env.OPENAI_BASE_URL || llmBaseUrl;
|
|
101
117
|
case 'google':
|
|
102
118
|
return process.env.GOOGLE_API_URL || llmBaseUrl;
|
|
103
119
|
case 'bedrock':
|