Skip to content

Commit d114bfa

Browse files
authored
gt pattern match (#5476)
1 parent 0893fef commit d114bfa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/cost/models/providers/helicone.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ export class HeliconeProvider extends BaseProvider {
6767
}
6868

6969
// Convert responses API format to chat completions format first
70-
// This supports both OpenAI and Anthropic models with the responses API
71-
if (context.bodyMapping === "RESPONSES" && !endpoint.providerModelId.includes("gpt")) {
70+
// GPT models (gpt-* and Helicone's pa/gt-*) support Responses API natively
71+
// Other models (o1, o3, claude, etc.) need conversion to chat completions
72+
if (context.bodyMapping === "RESPONSES" &&
73+
!endpoint.providerModelId.includes("gpt") &&
74+
!endpoint.providerModelId.includes("/gt")) {
7275
updatedBody = context.toChatCompletions(updatedBody);
7376
}
7477

0 commit comments

Comments
 (0)