mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Remove unnecessary cost calculation from vscode-lm.ts (#2875)
* feat: Removed unnecessary cost calculation * Update vscode-lm.ts --------- Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
This commit is contained in:
parent
74faacd69d
commit
844753e0d9
1 changed files with 1 additions and 3 deletions
|
|
@ -2,7 +2,6 @@ import { Anthropic } from "@anthropic-ai/sdk"
|
|||
import * as vscode from "vscode"
|
||||
|
||||
import { SingleCompletionHandler } from "../"
|
||||
import { calculateApiCostAnthropic } from "../../utils/cost"
|
||||
import { ApiStream } from "../transform/stream"
|
||||
import { convertToVsCodeLmMessages } from "../transform/vscode-lm-format"
|
||||
import { SELECTOR_SEPARATOR, stringifyVsCodeLmModelSelector } from "../../shared/vsCodeSelectorUtils"
|
||||
|
|
@ -443,8 +442,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
|
|||
yield {
|
||||
type: "usage",
|
||||
inputTokens: totalInputTokens,
|
||||
outputTokens: totalOutputTokens,
|
||||
totalCost: calculateApiCostAnthropic(this.getModel().info, totalInputTokens, totalOutputTokens),
|
||||
outputTokens: totalOutputTokens
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
this.ensureCleanState()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue