mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 18:04:41 +00:00
fix(ai): Fix OpenAI Responses provider import order and cost calculation
This commit is contained in:
parent
f87ac359bb
commit
7db3068cee
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import type {
|
|||
ResponseOutputMessage,
|
||||
ResponseReasoningItem,
|
||||
} from "openai/resources/responses/responses.js";
|
||||
import { calculateCost } from "../models.js";
|
||||
import type {
|
||||
AssistantMessage,
|
||||
Context,
|
||||
|
|
@ -236,6 +237,8 @@ export class OpenAIResponsesLLM implements LLM<OpenAIResponsesLLMOptions> {
|
|||
stopReason = "toolUse";
|
||||
}
|
||||
|
||||
calculateCost(this.modelInfo, usage);
|
||||
|
||||
const output = {
|
||||
role: "assistant",
|
||||
content: blocks,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue