Skip to content

Commit 060df24

Browse files
committed
fix type errors
1 parent 77e9346 commit 060df24

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/lib/anthropic-compat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function fromClaudeMessages(
102102
const toolContent =
103103
typeof block.content === "string"
104104
? block.content
105-
: block.content.filter(isTextBlock).map((b) => b.text).join("");
105+
: block.content.filter(isTextBlock).map((b: models.ClaudeTextBlockParam) => b.text).join("");
106106
result.push(createFunctionCallOutput(block.tool_use_id, toolContent));
107107
}
108108
// Note: tool_use and image blocks in input are typically part of conversation history

src/models/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,4 @@ export * from "./usermessage.js";
155155
export * from "./websearchengine.js";
156156
export * from "./websearchpreviewtooluserlocation.js";
157157
export * from "./websearchstatus.js";
158+
export * from "./claude-message.js";

src/sdk/sdk.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import { Providers } from "./providers.js";
2020
// #region imports
2121
import {
2222
callModel as callModelFunc,
23-
type CallModelInput,
2423
} from "../funcs/call-model.js";
2524
import type { ModelResult } from "../lib/model-result.js";
2625
import type { RequestOptions } from "../lib/sdks.js";
2726
import { type MaxToolRounds, Tool, ToolType } from "../lib/tool-types.js";
2827
import type { OpenResponsesRequest } from "../models/openresponsesrequest.js";
28+
import type { OpenResponsesInput } from "../models/openresponsesinput.js";
2929

3030
export { ToolType };
3131
export type { MaxToolRounds };
@@ -100,7 +100,7 @@ export class OpenRouter extends ClientSDK {
100100
// #region sdk-class-body
101101
callModel(
102102
request: Omit<OpenResponsesRequest, "stream" | "tools" | "input"> & {
103-
input?: CallModelInput;
103+
input?: OpenResponsesInput;
104104
tools?: Tool[];
105105
maxToolRounds?: MaxToolRounds;
106106
},

0 commit comments

Comments
 (0)