mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 06:04:44 +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,
|
ResponseOutputMessage,
|
||||||
ResponseReasoningItem,
|
ResponseReasoningItem,
|
||||||
} from "openai/resources/responses/responses.js";
|
} from "openai/resources/responses/responses.js";
|
||||||
|
import { calculateCost } from "../models.js";
|
||||||
import type {
|
import type {
|
||||||
AssistantMessage,
|
AssistantMessage,
|
||||||
Context,
|
Context,
|
||||||
|
|
@ -236,6 +237,8 @@ export class OpenAIResponsesLLM implements LLM<OpenAIResponsesLLMOptions> {
|
||||||
stopReason = "toolUse";
|
stopReason = "toolUse";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
calculateCost(this.modelInfo, usage);
|
||||||
|
|
||||||
const output = {
|
const output = {
|
||||||
role: "assistant",
|
role: "assistant",
|
||||||
content: blocks,
|
content: blocks,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue