refactor(ai): align multimodal naming (#40073)
This commit is contained in:
parent
5d729521d3
commit
634b9b21dd
91 changed files with 563 additions and 500 deletions
|
|
@ -4,7 +4,7 @@ import {
|
|||
ContentPolicyReason,
|
||||
InvalidProviderOutputReason,
|
||||
InvalidRequestReason,
|
||||
LLMError,
|
||||
AIError,
|
||||
NoRouteReason,
|
||||
ModelID,
|
||||
ProviderID,
|
||||
|
|
@ -23,10 +23,10 @@ import { Tool } from "@opencode-ai/schema/tool"
|
|||
import { toSessionError } from "@opencode-ai/core/session/to-session-error"
|
||||
import { SessionRunnerRetry } from "@opencode-ai/core/session/runner/retry"
|
||||
|
||||
const llm = (reason: LLMError["reason"]) => new LLMError({ module: "test", method: "stream", reason })
|
||||
const llm = (reason: AIError["reason"]) => new AIError({ module: "test", method: "stream", reason })
|
||||
|
||||
describe("toSessionError", () => {
|
||||
test("maps every LLM reason to the open wire type", () => {
|
||||
test("maps every AI error reason to the open wire type", () => {
|
||||
expect(toSessionError(llm(new RateLimitReason({ message: "rate", retryAfterMs: 123 })))).toEqual({
|
||||
type: "provider.rate-limit",
|
||||
message: "rate",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue