Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ const ORIGIN = 'auto.ai.orchestrion.openai';
// Each instrumented `create` method maps to the gen_ai operation its span reports.
const INSTRUMENTED_CHANNELS = [
{ channel: CHANNELS.OPENAI_CHAT, operation: 'chat' },
{ channel: CHANNELS.OPENAI_RESPONSES, operation: 'chat' },
{ channel: CHANNELS.OPENAI_EMBEDDINGS, operation: 'embeddings' },
{ channel: CHANNELS.OPENAI_CONVERSATIONS, operation: 'chat' },
] as const;

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/server-utils/src/orchestrion/config/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const openaiConfig = [
})),
// OpenAI responses API — same `create(body, options)` shape as chat completions.
...['resources/responses/responses.js', 'resources/responses/responses.mjs'].map(filePath => ({
channelName: 'responses',
channelName: 'chat',
module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },
functionQuery: { className: 'Responses', methodName: 'create', kind: 'Auto' as const },
})),
Expand All @@ -23,15 +23,15 @@ export const openaiConfig = [
})),
// OpenAI conversations API — same `create(body, options)` shape as chat completions.
...['resources/conversations/conversations.js', 'resources/conversations/conversations.mjs'].map(filePath => ({
channelName: 'conversations',
channelName: 'chat',
module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },
functionQuery: { className: 'Conversations', methodName: 'create', kind: 'Auto' as const },
})),
] satisfies InstrumentationConfig[];

export const openaiChannels = {
// Chat completions, the responses API, and the conversations API all report a `chat` operation with
// identical span handling, so they share one channel.
OPENAI_CHAT: 'orchestrion:openai:chat',
OPENAI_RESPONSES: 'orchestrion:openai:responses',
OPENAI_EMBEDDINGS: 'orchestrion:openai:embeddings',
OPENAI_CONVERSATIONS: 'orchestrion:openai:conversations',
} as const;
Loading