refactor(ai): align multimodal naming (#40073)

This commit is contained in:
Aiden Cline 2026-08-01 21:57:05 -05:00 committed by GitHub
commit 634b9b21dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
91 changed files with 563 additions and 500 deletions

View file

@ -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",