@probelabs/probe 0.6.0-rc334 → 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.
@@ -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
 
@@ -31,10 +32,19 @@ export function createProviderInstance(config) {
31
32
  });
32
33
 
33
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
+ }
34
45
  const openai = createOpenAI({
35
46
  compatibility: 'strict',
36
47
  apiKey: config.apiKey,
37
- ...(config.baseURL && { baseURL: config.baseURL })
38
48
  });
39
49
  const chatProvider = (modelId, settings) => openai.chat(modelId, settings);
40
50
  chatProvider.chat = openai.chat.bind(openai);