@flink-app/openai-adapter 2.0.0-alpha.56 → 2.0.0-alpha.57
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/README.md +177 -23
- package/dist/OpenAIAdapter.d.ts +22 -47
- package/dist/OpenAIAdapter.d.ts.map +1 -1
- package/dist/OpenAIAdapter.js +110 -53
- package/dist/OpenAIAdapter.js.map +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -8,7 +8,6 @@ This adapter uses OpenAI's **Responses API** instead of the older Chat Completio
|
|
|
8
8
|
|
|
9
9
|
- **🔧 Step-aware reasoning**: Model returns multiple tool calls as explicit, typed items in a single response
|
|
10
10
|
- **⚡ Better performance**: 3% improvement on SWE-bench, 5% on TAUBench vs Chat Completions
|
|
11
|
-
- **💰 Lower costs**: 40-80% better cache utilization via response persistence
|
|
12
11
|
- **📦 First-class tool steps**: Tool calls and results are structured items, not message hacks
|
|
13
12
|
- **🎯 Future-proof**: All new OpenAI features will land in Responses API first
|
|
14
13
|
|
|
@@ -19,7 +18,6 @@ This adapter uses OpenAI's **Responses API** instead of the older Chat Completio
|
|
|
19
18
|
What it provides:
|
|
20
19
|
- Multiple tool calls in **one response** (you still execute them)
|
|
21
20
|
- Structured step types (message, function_call, function_call_output)
|
|
22
|
-
- Optional response persistence for caching
|
|
23
21
|
|
|
24
22
|
What **Flink handles** (via AgentRunner):
|
|
25
23
|
- Tool execution
|
|
@@ -145,28 +143,194 @@ const adapter = new OpenAIAdapter({
|
|
|
145
143
|
- Automatic schema validation during generation
|
|
146
144
|
- Supported on all modern models: `gpt-4.1`, `gpt-5`, `o4-mini`, `o3`
|
|
147
145
|
|
|
148
|
-
###
|
|
146
|
+
### Conversation Persistence (Recommended)
|
|
149
147
|
|
|
150
|
-
For
|
|
148
|
+
For multi-turn conversations, use `ConversationAgent` to automatically save conversation history:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
// src/agents/ChatAgent.ts
|
|
152
|
+
import { ConversationAgent, ConversationData } from "@flink-app/flink";
|
|
153
|
+
|
|
154
|
+
export default class ChatAgent extends ConversationAgent<AppContext> {
|
|
155
|
+
id = "chat-agent";
|
|
156
|
+
description = "Chat assistant with automatic conversation persistence";
|
|
157
|
+
instructions = "You are a helpful assistant...";
|
|
158
|
+
tools = ["search-knowledge"];
|
|
159
|
+
|
|
160
|
+
// Load conversation from your storage backend
|
|
161
|
+
protected async loadConversation(conversationId: string) {
|
|
162
|
+
const conv = await this.ctx.repos.conversationRepo.getById(conversationId);
|
|
163
|
+
return conv ? {
|
|
164
|
+
messages: conv.messages,
|
|
165
|
+
providerMetadata: conv.providerMetadata // ← Preserved for tracking
|
|
166
|
+
} : null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Save conversation with updated metadata
|
|
170
|
+
protected async saveConversation(conversationId: string, data: ConversationData) {
|
|
171
|
+
await this.ctx.repos.conversationRepo.upsert({
|
|
172
|
+
_id: conversationId,
|
|
173
|
+
messages: data.messages,
|
|
174
|
+
providerMetadata: data.providerMetadata // ← Saved automatically
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**What this enables:**
|
|
181
|
+
|
|
182
|
+
1. **Automatic History Management**: Framework handles full conversation history
|
|
183
|
+
2. **Metadata Tracking**: Provider metadata preserved for debugging and future use
|
|
184
|
+
3. **Storage Flexibility**: Works with MongoDB, Redis, in-memory, or any backend
|
|
185
|
+
4. **Type Safety**: Abstract methods enforce consistent implementation
|
|
186
|
+
|
|
187
|
+
**Example Storage Backends:**
|
|
188
|
+
- [MongoDB](../../packages/demo-app/src/agents/CarPersistentAgent.ts) - Production-ready persistent storage
|
|
189
|
+
- [In-Memory](../../packages/demo-app/src/agents/examples/InMemoryPersistentAgent.ts) - Development/testing
|
|
190
|
+
|
|
191
|
+
**How Provider Metadata Works:**
|
|
192
|
+
|
|
193
|
+
1. First turn: Agent executes, adapter may return provider-specific metadata
|
|
194
|
+
2. `saveConversation()` stores messages + metadata
|
|
195
|
+
3. Second turn: `loadConversation()` returns messages + metadata
|
|
196
|
+
4. Framework populates `input.providerMetadata` for tracking/debugging
|
|
197
|
+
5. Full conversation history is always sent for reliability
|
|
198
|
+
|
|
199
|
+
**Note:** Provider metadata is namespaced by adapter (e.g., `{ openai: {...}, anthropic: {...} }`) for multi-provider support.
|
|
200
|
+
|
|
201
|
+
## Debug Logging
|
|
202
|
+
|
|
203
|
+
The adapter includes component-specific logging to help debug API requests and responses:
|
|
151
204
|
|
|
152
205
|
```typescript
|
|
153
206
|
const adapter = new OpenAIAdapter({
|
|
154
207
|
apiKey: process.env.OPENAI_API_KEY!,
|
|
155
208
|
model: "gpt-5",
|
|
156
|
-
|
|
209
|
+
debug: true // Enable debug logging for this adapter
|
|
157
210
|
});
|
|
158
211
|
```
|
|
159
212
|
|
|
160
|
-
**What
|
|
161
|
-
|
|
162
|
-
|
|
213
|
+
**What gets logged:**
|
|
214
|
+
|
|
215
|
+
When `debug: true`:
|
|
216
|
+
- ✅ Initialization confirmation
|
|
217
|
+
- ✅ Request metadata (model, message count, tool count, token limits)
|
|
218
|
+
- ✅ Full request parameters sent to OpenAI
|
|
219
|
+
- ✅ Tool call decisions made by the LLM
|
|
220
|
+
- ✅ Token usage and performance metrics
|
|
221
|
+
- ✅ Response IDs for conversation continuation
|
|
222
|
+
- ✅ Error details with context
|
|
223
|
+
|
|
224
|
+
When `debug: false` (default):
|
|
225
|
+
- ✅ Request completion with token usage (info level)
|
|
226
|
+
- ✅ Errors with context
|
|
227
|
+
|
|
228
|
+
**Log Output Example:**
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
2026-02-15 [OpenAI] [INFO] OpenAI adapter initialized with debug logging enabled
|
|
232
|
+
2026-02-15 [OpenAI] [DEBUG] Starting OpenAI stream request {"model":"gpt-5","messageCount":2,"toolCount":3}
|
|
233
|
+
2026-02-15 [OpenAI] [DEBUG] Stream connection established
|
|
234
|
+
2026-02-15 [OpenAI] [DEBUG] LLM decided to call tool {"name":"get_weather","call_id":"call_abc123"}
|
|
235
|
+
2026-02-15 [OpenAI] [INFO] OpenAI request completed {"inputTokens":150,"outputTokens":80,"totalTokens":230}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Environment-Based Configuration:**
|
|
239
|
+
|
|
240
|
+
You can also enable debug logging via environment variables without code changes:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Enable debug for OpenAI adapter specifically
|
|
244
|
+
DEBUG=OpenAI npm start
|
|
245
|
+
|
|
246
|
+
# Enable debug for multiple components
|
|
247
|
+
DEBUG=OpenAI,Database npm start
|
|
248
|
+
|
|
249
|
+
# Set global log level
|
|
250
|
+
LOG_LEVEL=debug npm start
|
|
251
|
+
```
|
|
163
252
|
|
|
164
|
-
**
|
|
165
|
-
- It does NOT automatically manage conversation state
|
|
166
|
-
- You still need to pass full conversation history in messages
|
|
167
|
-
- It's purely about server-side response persistence
|
|
253
|
+
**Programmatic Control:**
|
|
168
254
|
|
|
169
|
-
|
|
255
|
+
For dynamic control at runtime:
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
import { FlinkLogFactory } from "@flink-app/flink";
|
|
259
|
+
|
|
260
|
+
// Enable debug for OpenAI adapter
|
|
261
|
+
FlinkLogFactory.setComponentLevel("OpenAI", "debug");
|
|
262
|
+
|
|
263
|
+
// Later, disable it
|
|
264
|
+
FlinkLogFactory.setComponentLevel("OpenAI", "info");
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Benefits:**
|
|
268
|
+
- 🔍 Debug API requests without flooding other logs
|
|
269
|
+
- 📊 Track token usage per request
|
|
270
|
+
- 🐛 Investigate tool calling issues
|
|
271
|
+
- ⚡ Monitor performance and latency
|
|
272
|
+
- 🎯 Component-specific logging (OpenAI logs don't affect Database, Cache, etc.)
|
|
273
|
+
|
|
274
|
+
See [Flink Logging Guide](../../docs/LOGGING.md) for more details on component-specific logging.
|
|
275
|
+
|
|
276
|
+
## Cache Metrics & Cost Optimization
|
|
277
|
+
|
|
278
|
+
The OpenAI adapter automatically captures detailed cache metrics to help you optimize costs and understand performance:
|
|
279
|
+
|
|
280
|
+
```typescript
|
|
281
|
+
const result = await ctx.agents.myAgent.execute({
|
|
282
|
+
message: "What's the weather?"
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
console.log(result.usage);
|
|
286
|
+
// {
|
|
287
|
+
// inputTokens: 2006,
|
|
288
|
+
// outputTokens: 300,
|
|
289
|
+
// cachedInputTokens: 1920 // 95% cache hit!
|
|
290
|
+
// }
|
|
291
|
+
|
|
292
|
+
// Calculate actual billed input tokens
|
|
293
|
+
const billedInputTokens = result.usage.inputTokens - (result.usage.cachedInputTokens || 0);
|
|
294
|
+
console.log(`Only ${billedInputTokens} tokens charged at full rate`);
|
|
295
|
+
// "Only 86 tokens charged at full rate"
|
|
296
|
+
|
|
297
|
+
// Estimate cost savings (cached tokens are ~10% of regular cost)
|
|
298
|
+
const regularCost = billedInputTokens * 1.0;
|
|
299
|
+
const cachedCost = (result.usage.cachedInputTokens || 0) * 0.1;
|
|
300
|
+
const totalCost = regularCost + cachedCost;
|
|
301
|
+
console.log(`Estimated cost factor: ${totalCost} (vs ${result.usage.inputTokens} without caching)`);
|
|
302
|
+
// "Estimated cost factor: 278 (vs 2006 without caching)" - 86% savings!
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Cache Metrics:**
|
|
306
|
+
- `inputTokens`: Total input tokens (including cached)
|
|
307
|
+
- `outputTokens`: Total output tokens
|
|
308
|
+
- `cachedInputTokens`: Input tokens served from cache (10% cost)
|
|
309
|
+
|
|
310
|
+
**OpenAI Caching:**
|
|
311
|
+
- Cached tokens cost ~10% of regular tokens
|
|
312
|
+
- Automatic caching for repeated context
|
|
313
|
+
- No configuration needed - OpenAI handles it automatically
|
|
314
|
+
|
|
315
|
+
**When Caching Helps Most:**
|
|
316
|
+
- Long system prompts used across requests
|
|
317
|
+
- Repeated context in multi-turn conversations
|
|
318
|
+
- Few-shot examples in prompts
|
|
319
|
+
- Large knowledge bases in context
|
|
320
|
+
|
|
321
|
+
**Logging:**
|
|
322
|
+
When debug mode is enabled, cache metrics are automatically logged:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
2026-02-23 [flink.ai.openai] [INFO] OpenAI request completed {
|
|
326
|
+
"inputTokens": 2006,
|
|
327
|
+
"outputTokens": 300,
|
|
328
|
+
"cachedInputTokens": 1920,
|
|
329
|
+
"totalTokens": 2306,
|
|
330
|
+
"status": "completed",
|
|
331
|
+
"model": "gpt-5"
|
|
332
|
+
}
|
|
333
|
+
```
|
|
170
334
|
|
|
171
335
|
## Multiple Adapters
|
|
172
336
|
|
|
@@ -303,11 +467,8 @@ For backwards compatibility:
|
|
|
303
467
|
- ✅ **Step-based tool calling** - Multiple tool calls in one response as typed items
|
|
304
468
|
- ✅ **Event-based streaming** - Proper event taxonomy (not just token streaming)
|
|
305
469
|
- ✅ **Structured outputs** with JSON schema (100% reliability)
|
|
306
|
-
- ✅ **Response persistence** for better caching (optional)
|
|
307
470
|
- ✅ **First-class tool steps** - function_call and function_call_output as explicit types
|
|
308
|
-
- ✅ **Zero Data Retention** mode for compliance
|
|
309
471
|
- ✅ Support for all OpenAI models
|
|
310
|
-
- ✅ 40-80% cost savings via better caching
|
|
311
472
|
- ✅ 3-5% performance improvement over Chat Completions
|
|
312
473
|
|
|
313
474
|
### What Makes Responses API Different
|
|
@@ -365,7 +526,6 @@ interface OpenAIAdapterOptions {
|
|
|
365
526
|
schema: Record<string, any>;
|
|
366
527
|
strict?: boolean;
|
|
367
528
|
};
|
|
368
|
-
persistResponse?: boolean; // Default: true
|
|
369
529
|
}
|
|
370
530
|
|
|
371
531
|
class OpenAIAdapter implements LLMAdapter {
|
|
@@ -379,7 +539,6 @@ class OpenAIAdapter implements LLMAdapter {
|
|
|
379
539
|
- `apiKey`: Your OpenAI API key
|
|
380
540
|
- `model`: The OpenAI model to use (e.g., "gpt-5", "o4-mini")
|
|
381
541
|
- `structuredOutput`: Optional JSON schema for structured outputs
|
|
382
|
-
- `persistResponse`: Whether to persist responses on OpenAI servers for caching (default: `true`)
|
|
383
542
|
|
|
384
543
|
## Architecture Notes
|
|
385
544
|
|
|
@@ -403,10 +562,6 @@ This adapter uses OpenAI's **Responses API**, which differs from Chat Completion
|
|
|
403
562
|
- Chat Completions: `response_format: { type: "json_schema", json_schema: {...} }`
|
|
404
563
|
- Responses API: `text: { format: { type: "json_schema", ... } }`
|
|
405
564
|
|
|
406
|
-
**State Management:**
|
|
407
|
-
- Chat Completions: Manual conversation state management
|
|
408
|
-
- Responses API: Optional response persistence with `persistResponse: true` (for caching, not automatic state replay)
|
|
409
|
-
|
|
410
565
|
### Flink Integration
|
|
411
566
|
|
|
412
567
|
The adapter seamlessly integrates with Flink's `LLMAdapter` interface:
|
|
@@ -448,7 +603,6 @@ const app = new FlinkApp({
|
|
|
448
603
|
Benefits of upgrading:
|
|
449
604
|
- ✅ Step-aware reasoning (multiple tool calls per response)
|
|
450
605
|
- ✅ Better performance (3-5% improvement on benchmarks)
|
|
451
|
-
- ✅ Lower costs (40-80% better caching via response persistence)
|
|
452
606
|
- ✅ First-class tool steps (cleaner than message role hacks)
|
|
453
607
|
- ✅ Future-proof (new features land here first)
|
|
454
608
|
|
package/dist/OpenAIAdapter.d.ts
CHANGED
|
@@ -22,25 +22,6 @@ export interface OpenAIAdapterOptions {
|
|
|
22
22
|
schema: Record<string, unknown>;
|
|
23
23
|
strict?: boolean;
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Optional: Persist responses on OpenAI's servers (default: true)
|
|
27
|
-
*
|
|
28
|
-
* When enabled:
|
|
29
|
-
* - OpenAI stores the response for later retrieval via response_id
|
|
30
|
-
* - Improves cache hit rates for similar requests
|
|
31
|
-
* - Enables conversation branching via previous_response_id
|
|
32
|
-
*
|
|
33
|
-
* When disabled (store: false):
|
|
34
|
-
* - No data stored on OpenAI's servers (ZDR compliance)
|
|
35
|
-
* - You must manually manage conversation state
|
|
36
|
-
* - Cache benefits are reduced
|
|
37
|
-
*
|
|
38
|
-
* IMPORTANT: This does NOT automatically manage conversation state across calls.
|
|
39
|
-
* You still need to pass conversation history in the messages parameter.
|
|
40
|
-
*
|
|
41
|
-
* @default true
|
|
42
|
-
*/
|
|
43
|
-
persistResponse?: boolean;
|
|
44
25
|
/**
|
|
45
26
|
* Optional: Enable debug logging for development and troubleshooting
|
|
46
27
|
*
|
|
@@ -60,7 +41,6 @@ export interface OpenAIAdapterOptions {
|
|
|
60
41
|
* - Step-aware reasoning: Model can return multiple tool calls in a single response
|
|
61
42
|
* - Explicit tool invocation: Tool calls and results are first-class typed items
|
|
62
43
|
* - Better performance: 3% improvement on SWE-bench, 5% on TAUBench
|
|
63
|
-
* - Lower costs: 40-80% better cache utilization via response persistence
|
|
64
44
|
*
|
|
65
45
|
* ## Architecture
|
|
66
46
|
*
|
|
@@ -69,7 +49,6 @@ export interface OpenAIAdapterOptions {
|
|
|
69
49
|
* What it provides:
|
|
70
50
|
* - Multiple tool calls in one response (but you execute them)
|
|
71
51
|
* - Structured step types (message, function_call, function_call_output)
|
|
72
|
-
* - Optional response persistence for caching/branching
|
|
73
52
|
* - Streaming event taxonomy
|
|
74
53
|
*
|
|
75
54
|
* What you still handle:
|
|
@@ -113,7 +92,6 @@ export interface OpenAIAdapterOptions {
|
|
|
113
92
|
* - ✅ Step-based tool calling with multiple calls per response
|
|
114
93
|
* - ✅ Streaming support with event-based updates
|
|
115
94
|
* - ✅ Structured outputs with JSON schema (100% reliability)
|
|
116
|
-
* - ✅ Optional response persistence for better caching
|
|
117
95
|
* - ✅ Support for all OpenAI models (GPT-4.1, GPT-5, o-series)
|
|
118
96
|
* - ✅ Flexible system instructions (top-level or in messages)
|
|
119
97
|
*
|
|
@@ -155,22 +133,13 @@ export interface OpenAIAdapterOptions {
|
|
|
155
133
|
* }
|
|
156
134
|
* });
|
|
157
135
|
* ```
|
|
158
|
-
*
|
|
159
|
-
* ## Zero Data Retention (ZDR)
|
|
160
|
-
* ```typescript
|
|
161
|
-
* const adapter = new OpenAIAdapter({
|
|
162
|
-
* apiKey: process.env.OPENAI_API_KEY!,
|
|
163
|
-
* model: "gpt-5",
|
|
164
|
-
* persistResponse: false // Don't store responses on OpenAI servers
|
|
165
|
-
* });
|
|
166
|
-
* ```
|
|
167
136
|
*/
|
|
168
137
|
export declare class OpenAIAdapter implements LLMAdapter<FlinkToolSchema> {
|
|
169
138
|
private client;
|
|
170
139
|
private model;
|
|
171
140
|
private structuredOutput?;
|
|
172
|
-
private persistResponse;
|
|
173
141
|
debug: boolean;
|
|
142
|
+
private log;
|
|
174
143
|
constructor(options: OpenAIAdapterOptions);
|
|
175
144
|
constructor(apiKey: string, model: string);
|
|
176
145
|
stream(params: {
|
|
@@ -179,30 +148,36 @@ export declare class OpenAIAdapter implements LLMAdapter<FlinkToolSchema> {
|
|
|
179
148
|
tools: FlinkToolSchema[];
|
|
180
149
|
maxTokens: number;
|
|
181
150
|
temperature: number;
|
|
151
|
+
providerMetadata?: Record<string, any>;
|
|
182
152
|
}): AsyncGenerator<LLMStreamChunk>;
|
|
183
153
|
/**
|
|
184
154
|
* Convert Flink messages to OpenAI Responses API input format
|
|
185
155
|
*
|
|
186
|
-
*
|
|
156
|
+
* Always sends full conversation history for reliability.
|
|
187
157
|
*
|
|
188
|
-
* The Responses API
|
|
189
|
-
* 1. System messages
|
|
190
|
-
* 2. User messages
|
|
191
|
-
* 3.
|
|
192
|
-
* 4. Function
|
|
158
|
+
* The Responses API accepts:
|
|
159
|
+
* 1. System messages: { role: "system", content: "..." }
|
|
160
|
+
* 2. User messages: { role: "user", content: "..." }
|
|
161
|
+
* 3. Assistant messages: { role: "assistant", content: "..." }
|
|
162
|
+
* 4. Function calls: { type: "function_call", ... } ← From previous responses
|
|
163
|
+
* 5. Function call outputs: { type: "function_call_output", ... } ← Tool results
|
|
193
164
|
*
|
|
194
|
-
*
|
|
165
|
+
* Multi-turn pattern:
|
|
195
166
|
* - User: "What's the weather?"
|
|
196
|
-
* -
|
|
197
|
-
* -
|
|
198
|
-
* -
|
|
167
|
+
* - Assistant: "Let me check" + function_call
|
|
168
|
+
* - function_call_output: "22°C"
|
|
169
|
+
* - Assistant: "It's 22°C and sunny"
|
|
170
|
+
* - User: "What about tomorrow?"
|
|
199
171
|
*
|
|
200
|
-
*
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
*
|
|
204
|
-
*
|
|
172
|
+
* All message types are preserved for full conversation context.
|
|
173
|
+
*/
|
|
174
|
+
/**
|
|
175
|
+
* Build the OpenAI user content from text/image content blocks.
|
|
176
|
+
* Returns a plain string when there are no images (most common case),
|
|
177
|
+
* or an array of input_text / input_image items for multimodal messages.
|
|
178
|
+
* Returns null if there are no user-facing blocks.
|
|
205
179
|
*/
|
|
180
|
+
private buildOpenAIUserContent;
|
|
206
181
|
private convertMessagesToResponsesInput;
|
|
207
182
|
/**
|
|
208
183
|
* Convert Flink tools to Responses API format
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAIAdapter.d.ts","sourceRoot":"","sources":["../src/OpenAIAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAmB,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAcpH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE;QACf,IAAI,EAAE,aAAa,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,MAAM,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IAEF
|
|
1
|
+
{"version":3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,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC1C,GAAG,cAAc,CAAC,cAAc,CAAC;IAuKlC;;;;;;;;;;;;;;;;;;;;OAoBG;IAEH;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAqB9B,OAAO,CAAC,+BAA+B;IAqGvC;;;;;;;;OAQG;IACH,OAAO,CAAC,6BAA6B;IAUrC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,2BAA2B;IAiFnC;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,mBAAmB;CAkB9B"}
|
package/dist/OpenAIAdapter.js
CHANGED
|
@@ -13,7 +13,6 @@ const openai_1 = __importDefault(require("openai"));
|
|
|
13
13
|
* - Step-aware reasoning: Model can return multiple tool calls in a single response
|
|
14
14
|
* - Explicit tool invocation: Tool calls and results are first-class typed items
|
|
15
15
|
* - Better performance: 3% improvement on SWE-bench, 5% on TAUBench
|
|
16
|
-
* - Lower costs: 40-80% better cache utilization via response persistence
|
|
17
16
|
*
|
|
18
17
|
* ## Architecture
|
|
19
18
|
*
|
|
@@ -22,7 +21,6 @@ const openai_1 = __importDefault(require("openai"));
|
|
|
22
21
|
* What it provides:
|
|
23
22
|
* - Multiple tool calls in one response (but you execute them)
|
|
24
23
|
* - Structured step types (message, function_call, function_call_output)
|
|
25
|
-
* - Optional response persistence for caching/branching
|
|
26
24
|
* - Streaming event taxonomy
|
|
27
25
|
*
|
|
28
26
|
* What you still handle:
|
|
@@ -66,7 +64,6 @@ const openai_1 = __importDefault(require("openai"));
|
|
|
66
64
|
* - ✅ Step-based tool calling with multiple calls per response
|
|
67
65
|
* - ✅ Streaming support with event-based updates
|
|
68
66
|
* - ✅ Structured outputs with JSON schema (100% reliability)
|
|
69
|
-
* - ✅ Optional response persistence for better caching
|
|
70
67
|
* - ✅ Support for all OpenAI models (GPT-4.1, GPT-5, o-series)
|
|
71
68
|
* - ✅ Flexible system instructions (top-level or in messages)
|
|
72
69
|
*
|
|
@@ -108,33 +105,28 @@ const openai_1 = __importDefault(require("openai"));
|
|
|
108
105
|
* }
|
|
109
106
|
* });
|
|
110
107
|
* ```
|
|
111
|
-
*
|
|
112
|
-
* ## Zero Data Retention (ZDR)
|
|
113
|
-
* ```typescript
|
|
114
|
-
* const adapter = new OpenAIAdapter({
|
|
115
|
-
* apiKey: process.env.OPENAI_API_KEY!,
|
|
116
|
-
* model: "gpt-5",
|
|
117
|
-
* persistResponse: false // Don't store responses on OpenAI servers
|
|
118
|
-
* });
|
|
119
|
-
* ```
|
|
120
108
|
*/
|
|
121
109
|
class OpenAIAdapter {
|
|
122
110
|
constructor(optionsOrApiKey, model) {
|
|
111
|
+
this.log = flink_1.FlinkLogFactory.createLogger("flink.ai.openai");
|
|
123
112
|
if (typeof optionsOrApiKey === "string") {
|
|
124
113
|
// Legacy constructor: new OpenAIAdapter(apiKey, model)
|
|
125
114
|
this.client = new openai_1.default({ apiKey: optionsOrApiKey });
|
|
126
115
|
this.model = model;
|
|
127
|
-
this.persistResponse = true; // Default: persist for caching benefits
|
|
128
116
|
this.debug = false; // Default: no debug logging
|
|
129
117
|
}
|
|
130
118
|
else {
|
|
131
|
-
// New constructor: new OpenAIAdapter({ apiKey, model, structuredOutput,
|
|
119
|
+
// New constructor: new OpenAIAdapter({ apiKey, model, structuredOutput, debug })
|
|
132
120
|
this.client = new openai_1.default({ apiKey: optionsOrApiKey.apiKey });
|
|
133
121
|
this.model = optionsOrApiKey.model;
|
|
134
122
|
this.structuredOutput = optionsOrApiKey.structuredOutput;
|
|
135
|
-
this.persistResponse = optionsOrApiKey.persistResponse ?? true; // Default: persist
|
|
136
123
|
this.debug = optionsOrApiKey.debug ?? false; // Default: no debug logging
|
|
137
124
|
}
|
|
125
|
+
// Enable debug logging for this component if debug flag is set
|
|
126
|
+
if (this.debug) {
|
|
127
|
+
this.log.setLevel("debug");
|
|
128
|
+
this.log.info("OpenAI adapter initialized with debug logging enabled");
|
|
129
|
+
}
|
|
138
130
|
}
|
|
139
131
|
async *stream(params) {
|
|
140
132
|
try {
|
|
@@ -164,18 +156,26 @@ class OpenAIAdapter {
|
|
|
164
156
|
tools: tools,
|
|
165
157
|
max_output_tokens: params.maxTokens,
|
|
166
158
|
text: textFormat,
|
|
167
|
-
store: this.persistResponse,
|
|
168
159
|
stream: true,
|
|
169
160
|
// Only include temperature for models that support it
|
|
170
161
|
// Reasoning models (o1, o3, gpt-5) don't support temperature
|
|
171
162
|
...(this.isReasoningModel() ? {} : { temperature: params.temperature }),
|
|
172
163
|
};
|
|
164
|
+
this.log.debug("Starting OpenAI stream request", {
|
|
165
|
+
model: this.model,
|
|
166
|
+
messageCount: input.length,
|
|
167
|
+
toolCount: tools?.length || 0,
|
|
168
|
+
maxTokens: params.maxTokens,
|
|
169
|
+
hasStructuredOutput: !!this.structuredOutput,
|
|
170
|
+
});
|
|
173
171
|
if (this.debug) {
|
|
174
|
-
|
|
172
|
+
this.log.debug("Full request params:", streamParams);
|
|
175
173
|
}
|
|
176
174
|
const stream = await this.client.responses.stream(streamParams);
|
|
175
|
+
this.log.debug("Stream connection established");
|
|
177
176
|
let totalInputTokens = 0;
|
|
178
177
|
let totalOutputTokens = 0;
|
|
178
|
+
let cachedInputTokens = 0;
|
|
179
179
|
let finalStatus = "completed";
|
|
180
180
|
// Track function calls in progress (streaming may send partial data)
|
|
181
181
|
const functionCallsInProgress = new Map();
|
|
@@ -210,14 +210,12 @@ class OpenAIAdapter {
|
|
|
210
210
|
// Read arguments from the done event item, not from accumulated deltas
|
|
211
211
|
// The item.arguments property contains the complete arguments string
|
|
212
212
|
const funcItem = item;
|
|
213
|
-
// Log the tool call decision from LLM
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}, null, 2));
|
|
220
|
-
}
|
|
213
|
+
// Log the tool call decision from LLM
|
|
214
|
+
this.log.debug("LLM decided to call tool", {
|
|
215
|
+
name: funcItem.name,
|
|
216
|
+
call_id: funcItem.call_id,
|
|
217
|
+
arguments: funcItem.arguments,
|
|
218
|
+
});
|
|
221
219
|
// Handle empty string arguments (LLM sometimes sends "" instead of "{}")
|
|
222
220
|
const argsStr = funcItem.arguments?.trim() || "{}";
|
|
223
221
|
yield {
|
|
@@ -236,24 +234,45 @@ class OpenAIAdapter {
|
|
|
236
234
|
if (response?.usage) {
|
|
237
235
|
totalInputTokens = response.usage.input_tokens || 0;
|
|
238
236
|
totalOutputTokens = response.usage.output_tokens || 0;
|
|
237
|
+
// Capture cached tokens from prompt_tokens_details
|
|
238
|
+
// @ts-ignore - OpenAI SDK types may not include this yet
|
|
239
|
+
cachedInputTokens = response.usage.input_tokens_details?.cached_tokens || 0;
|
|
239
240
|
}
|
|
240
241
|
finalStatus = response?.status || "completed";
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
|
-
//
|
|
244
|
+
// Log token usage
|
|
245
|
+
this.log.info("OpenAI request completed", {
|
|
246
|
+
inputTokens: totalInputTokens,
|
|
247
|
+
outputTokens: totalOutputTokens,
|
|
248
|
+
cachedInputTokens: cachedInputTokens,
|
|
249
|
+
totalTokens: totalInputTokens + totalOutputTokens,
|
|
250
|
+
status: finalStatus,
|
|
251
|
+
model: this.model,
|
|
252
|
+
});
|
|
253
|
+
// Yield usage
|
|
244
254
|
yield {
|
|
245
255
|
type: "usage",
|
|
246
256
|
usage: {
|
|
247
257
|
inputTokens: totalInputTokens,
|
|
248
258
|
outputTokens: totalOutputTokens,
|
|
259
|
+
...(cachedInputTokens > 0 && { cachedInputTokens }),
|
|
249
260
|
},
|
|
250
261
|
};
|
|
262
|
+
// Yield done
|
|
251
263
|
yield {
|
|
252
264
|
type: "done",
|
|
253
265
|
stopReason: this.normalizeStopReason(finalStatus),
|
|
254
266
|
};
|
|
255
267
|
}
|
|
256
268
|
catch (error) {
|
|
269
|
+
// Log the error
|
|
270
|
+
this.log.error("OpenAI API request failed", {
|
|
271
|
+
status: error.status,
|
|
272
|
+
message: error.message,
|
|
273
|
+
model: this.model,
|
|
274
|
+
error: error,
|
|
275
|
+
});
|
|
257
276
|
// Enhanced error handling for OpenAI API errors
|
|
258
277
|
if (error.status === 400) {
|
|
259
278
|
throw new Error(`OpenAI API error (400 Bad Request): ${error.message || "Invalid request"}. ` +
|
|
@@ -266,26 +285,50 @@ class OpenAIAdapter {
|
|
|
266
285
|
/**
|
|
267
286
|
* Convert Flink messages to OpenAI Responses API input format
|
|
268
287
|
*
|
|
269
|
-
*
|
|
288
|
+
* Always sends full conversation history for reliability.
|
|
270
289
|
*
|
|
271
|
-
* The Responses API
|
|
272
|
-
* 1. System messages
|
|
273
|
-
* 2. User messages
|
|
274
|
-
* 3.
|
|
275
|
-
* 4. Function
|
|
290
|
+
* The Responses API accepts:
|
|
291
|
+
* 1. System messages: { role: "system", content: "..." }
|
|
292
|
+
* 2. User messages: { role: "user", content: "..." }
|
|
293
|
+
* 3. Assistant messages: { role: "assistant", content: "..." }
|
|
294
|
+
* 4. Function calls: { type: "function_call", ... } ← From previous responses
|
|
295
|
+
* 5. Function call outputs: { type: "function_call_output", ... } ← Tool results
|
|
276
296
|
*
|
|
277
|
-
*
|
|
297
|
+
* Multi-turn pattern:
|
|
278
298
|
* - User: "What's the weather?"
|
|
279
|
-
* -
|
|
280
|
-
* -
|
|
281
|
-
* -
|
|
299
|
+
* - Assistant: "Let me check" + function_call
|
|
300
|
+
* - function_call_output: "22°C"
|
|
301
|
+
* - Assistant: "It's 22°C and sunny"
|
|
302
|
+
* - User: "What about tomorrow?"
|
|
282
303
|
*
|
|
283
|
-
*
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
*
|
|
287
|
-
*
|
|
304
|
+
* All message types are preserved for full conversation context.
|
|
305
|
+
*/
|
|
306
|
+
/**
|
|
307
|
+
* Build the OpenAI user content from text/image content blocks.
|
|
308
|
+
* Returns a plain string when there are no images (most common case),
|
|
309
|
+
* or an array of input_text / input_image items for multimodal messages.
|
|
310
|
+
* Returns null if there are no user-facing blocks.
|
|
288
311
|
*/
|
|
312
|
+
buildOpenAIUserContent(blocks) {
|
|
313
|
+
const textBlocks = blocks.filter((b) => b.type === "text");
|
|
314
|
+
const imageBlocks = blocks.filter((b) => b.type === "image");
|
|
315
|
+
if (imageBlocks.length === 0) {
|
|
316
|
+
// Text-only: keep as plain string for backwards compat
|
|
317
|
+
const firstText = textBlocks[0];
|
|
318
|
+
return firstText && firstText.type === "text" ? firstText.text : null;
|
|
319
|
+
}
|
|
320
|
+
// Multimodal: build content array
|
|
321
|
+
const content = [];
|
|
322
|
+
for (const block of textBlocks) {
|
|
323
|
+
if (block.type === "text")
|
|
324
|
+
content.push({ type: "input_text", text: block.text });
|
|
325
|
+
}
|
|
326
|
+
for (const block of imageBlocks) {
|
|
327
|
+
if (block.type === "image")
|
|
328
|
+
content.push({ type: "input_image", image_url: block.url });
|
|
329
|
+
}
|
|
330
|
+
return content.length > 0 ? content : null;
|
|
331
|
+
}
|
|
289
332
|
convertMessagesToResponsesInput(instructions, messages) {
|
|
290
333
|
const result = [];
|
|
291
334
|
// 1. Prepend instructions as system message (Vercel AI SDK pattern)
|
|
@@ -295,6 +338,7 @@ class OpenAIAdapter {
|
|
|
295
338
|
content: instructions,
|
|
296
339
|
});
|
|
297
340
|
}
|
|
341
|
+
// Convert all messages to full conversation history
|
|
298
342
|
for (const msg of messages) {
|
|
299
343
|
// 2. Handle additional system messages (for dynamic context)
|
|
300
344
|
if (msg.role === "system") {
|
|
@@ -314,11 +358,11 @@ class OpenAIAdapter {
|
|
|
314
358
|
});
|
|
315
359
|
}
|
|
316
360
|
else {
|
|
317
|
-
// Handle content blocks (tool results)
|
|
361
|
+
// Handle content blocks (tool results + text + images)
|
|
318
362
|
const content = msg.content;
|
|
319
363
|
const toolResultBlocks = content.filter((block) => block.type === "tool_result");
|
|
320
|
-
const
|
|
321
|
-
// Add function call outputs (tool results)
|
|
364
|
+
const userBlocks = content.filter((block) => block.type !== "tool_result");
|
|
365
|
+
// Add function call outputs (tool results) — these are top-level items
|
|
322
366
|
for (const block of toolResultBlocks) {
|
|
323
367
|
if (block.type === "tool_result") {
|
|
324
368
|
result.push({
|
|
@@ -328,25 +372,38 @@ class OpenAIAdapter {
|
|
|
328
372
|
});
|
|
329
373
|
}
|
|
330
374
|
}
|
|
331
|
-
// Add user text if present
|
|
332
|
-
const
|
|
333
|
-
if (
|
|
334
|
-
result.push({
|
|
335
|
-
role: "user",
|
|
336
|
-
content: firstTextBlock.text,
|
|
337
|
-
});
|
|
375
|
+
// Add user content (text + images) if present
|
|
376
|
+
const userContent = this.buildOpenAIUserContent(userBlocks);
|
|
377
|
+
if (userContent) {
|
|
378
|
+
result.push({ role: "user", content: userContent });
|
|
338
379
|
}
|
|
339
380
|
}
|
|
340
381
|
continue;
|
|
341
382
|
}
|
|
342
|
-
// 4. Handle assistant messages
|
|
383
|
+
// 4. Handle assistant messages
|
|
343
384
|
if (msg.role === "assistant") {
|
|
344
385
|
if (typeof msg.content === "string") {
|
|
345
|
-
//
|
|
386
|
+
// Pass through text-only assistant messages
|
|
387
|
+
result.push({
|
|
388
|
+
role: "assistant",
|
|
389
|
+
content: msg.content,
|
|
390
|
+
});
|
|
346
391
|
continue;
|
|
347
392
|
}
|
|
393
|
+
// Handle assistant messages with content blocks (tool calls)
|
|
348
394
|
const content = msg.content;
|
|
395
|
+
const textBlocks = content.filter((block) => block.type === "text");
|
|
349
396
|
const toolUseBlocks = content.filter((block) => block.type === "tool_use");
|
|
397
|
+
// Add assistant message if there's text content
|
|
398
|
+
if (textBlocks.length > 0) {
|
|
399
|
+
const firstTextBlock = textBlocks[0];
|
|
400
|
+
if (firstTextBlock.type === "text") {
|
|
401
|
+
result.push({
|
|
402
|
+
role: "assistant",
|
|
403
|
+
content: firstTextBlock.text,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}
|
|
350
407
|
// Add function calls (these MUST be included for context)
|
|
351
408
|
for (const block of toolUseBlocks) {
|
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G,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACK,mBAAmB,CAAC,MAAc;QACtC,sDAAsD;QACtD,QAAQ,MAAM,EAAE,CAAC;YACb,KAAK,YAAY;gBACb,OAAO,YAAY,CAAC,CAAC,kBAAkB;YAC3C,KAAK,QAAQ;gBACT,sEAAsE;gBACtE,4CAA4C;gBAC5C,OAAO,YAAY,CAAC,CAAC,6BAA6B;YACtD,KAAK,WAAW;gBACZ,OAAO,UAAU,CAAC,CAAC,wBAAwB;YAC/C,KAAK,WAAW,CAAC;YACjB;gBACI,+DAA+D;gBAC/D,8DAA8D;gBAC9D,OAAO,UAAU,CAAC;QAC1B,CAAC;IACL,CAAC;CACJ;AA9gBD,sCA8gBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flink-app/openai-adapter",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.57",
|
|
4
4
|
"description": "OpenAI adapter for Flink AI framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"openai": "^4.77.3"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@flink-app/flink": ">=2.0.0-alpha.
|
|
21
|
+
"@flink-app/flink": ">=2.0.0-alpha.57"
|
|
22
22
|
},
|
|
23
23
|
"peerDependenciesMeta": {
|
|
24
24
|
"@flink-app/flink": {
|
|
@@ -26,8 +26,10 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
+
"@types/jasmine": "^3.7.1",
|
|
30
|
+
"ts-node": "^10.9.2",
|
|
29
31
|
"typescript": "^5.6.2",
|
|
30
|
-
"@flink-app/flink": "2.0.0-alpha.
|
|
32
|
+
"@flink-app/flink": "2.0.0-alpha.57"
|
|
31
33
|
},
|
|
32
34
|
"files": [
|
|
33
35
|
"dist",
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
"scripts": {
|
|
42
44
|
"build": "tsc --project tsconfig.dist.json",
|
|
43
45
|
"watch": "tsc --project tsconfig.dist.json --watch",
|
|
44
|
-
"test": "
|
|
46
|
+
"test": "../../node_modules/.bin/jasmine-ts --config=./spec/support/jasmine.json",
|
|
45
47
|
"clean": "rm -rf dist"
|
|
46
48
|
}
|
|
47
49
|
}
|