mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-07 01:29:44 -04:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50df99a8f3 | |||
| abaabdcb73 | |||
| 8f2afba7a5 | |||
| 31f94f205e | |||
| 542b082373 | |||
| 2f2fcc1654 | |||
| a69b70d5ca | |||
| 02edad83b2 | |||
| 5661af2034 |
@@ -9,6 +9,7 @@
|
||||
"opencode": "./src/index.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "bun run script/build.ts",
|
||||
"dev": "bun run src/index.ts",
|
||||
"typecheck": "tsgo --noEmit"
|
||||
},
|
||||
|
||||
@@ -8,8 +8,12 @@ import { AbsolutePath } from "@opencode-ai/core/schema"
|
||||
|
||||
export const AgentsCommand = Command.make("agents", {}, () =>
|
||||
Effect.gen(function* () {
|
||||
yield* PluginBoot.Service.use((service) => service.wait())
|
||||
const agents = yield* AgentV2.Service.use((service) => service.all())
|
||||
const svc = {
|
||||
plugin: yield* PluginBoot.Service,
|
||||
agent: yield* AgentV2.Service,
|
||||
}
|
||||
yield* svc.plugin.wait()
|
||||
const agents = yield* svc.agent.all()
|
||||
process.stdout.write(
|
||||
JSON.stringify(
|
||||
agents.sort((a, b) => a.id.localeCompare(b.id)),
|
||||
|
||||
@@ -122,6 +122,7 @@ export interface Interface {
|
||||
readonly remove: (id: ID) => Effect.Effect<void, Error>
|
||||
readonly activate: (id: ID) => Effect.Effect<void, Error>
|
||||
readonly active: (serviceID: ServiceID) => Effect.Effect<Info | undefined, Error>
|
||||
readonly activeAll: () => Effect.Effect<Map<ServiceID, Info>, Error>
|
||||
readonly forService: (serviceID: ServiceID) => Effect.Effect<Info[], Error>
|
||||
}
|
||||
|
||||
@@ -216,6 +217,19 @@ export const layer = Layer.effect(
|
||||
)
|
||||
}),
|
||||
|
||||
activeAll: Effect.fn("Auth.activeAll")(function* () {
|
||||
const data = yield* SynchronizedRef.get(state)
|
||||
const result = new Map<ServiceID, Info>()
|
||||
for (const account of Object.values(data.accounts)) {
|
||||
if (!result.has(account.serviceID)) result.set(account.serviceID, account)
|
||||
}
|
||||
for (const [serviceID, id] of Object.entries(data.active)) {
|
||||
const account = data.accounts[id]
|
||||
if (account) result.set(ServiceID.make(serviceID), account)
|
||||
}
|
||||
return result
|
||||
}),
|
||||
|
||||
forService: Effect.fn("Auth.list")(function* (serviceID) {
|
||||
return Object.values((yield* SynchronizedRef.get(state)).accounts).filter((a) => a.serviceID === serviceID)
|
||||
}),
|
||||
|
||||
@@ -166,8 +166,14 @@ export const layer = Layer.effect(
|
||||
model: {
|
||||
get: (providerID, modelID) => draft.providers.get(providerID)?.models.get(modelID),
|
||||
update: (providerID, modelID, fn) => {
|
||||
result.provider.update(providerID, () => {})
|
||||
const record = draft.providers.get(providerID)!
|
||||
let record = draft.providers.get(providerID)
|
||||
if (!record) {
|
||||
record = castDraft({
|
||||
provider: ProviderV2.Info.empty(providerID),
|
||||
models: new Map<ModelV2.ID, ModelV2.Info>(),
|
||||
})
|
||||
draft.providers.set(providerID, record)
|
||||
}
|
||||
const model = record.models.get(modelID) ?? castDraft(ModelV2.Info.empty(providerID, modelID))
|
||||
if (!record.models.has(modelID)) record.models.set(modelID, model)
|
||||
fn(model)
|
||||
@@ -190,6 +196,7 @@ export const layer = Layer.effect(
|
||||
},
|
||||
finalize: Effect.fn("CatalogV2.finalize")(function* (catalog, reason) {
|
||||
if (reason !== "plugin.added") yield* plugin.trigger("catalog.transform", catalog, {}).pipe(Effect.asVoid)
|
||||
if (!policy.hasStatements()) return
|
||||
for (const record of [...catalog.provider.list()]) {
|
||||
if ((yield* policy.evaluate("provider.use", record.provider.id, "allow")) === "deny") {
|
||||
catalog.provider.remove(record.provider.id)
|
||||
|
||||
@@ -47,7 +47,7 @@ export function applyOnly(db: Database, input: Migration[]) {
|
||||
if (completed.has(migration.id)) continue
|
||||
yield* db.transaction((tx) =>
|
||||
Effect.gen(function* () {
|
||||
yield* migration.up(tx)
|
||||
if (!process.env.OPENCODE_SKIP_MIGRATIONS) yield* migration.up(tx)
|
||||
yield* tx.run(
|
||||
sql`INSERT INTO ${sql.identifier("migration")} (id, time_completed) VALUES (${migration.id}, ${Date.now()})`,
|
||||
)
|
||||
|
||||
@@ -68,8 +68,8 @@ export class Info extends Schema.Class<Info>("ModelV2.Info")({
|
||||
output: Schema.Int,
|
||||
}),
|
||||
}) {
|
||||
static empty(providerID: ProviderV2.ID, modelID: ID) {
|
||||
return new Info({
|
||||
static empty(providerID: ProviderV2.ID, modelID: ID): Info {
|
||||
return {
|
||||
id: modelID,
|
||||
apiID: modelID,
|
||||
providerID,
|
||||
@@ -101,7 +101,7 @@ export class Info extends Schema.Class<Info>("ModelV2.Info")({
|
||||
context: 0,
|
||||
output: 0,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,14 @@ export const layer = Layer.effect(
|
||||
const existing = hooks.find((item) => item.id === input.id)
|
||||
if (existing) yield* Scope.close(existing.scope, Exit.void).pipe(Effect.ignore)
|
||||
const scope = yield* Scope.make()
|
||||
const result = yield* input.effect.pipe(Scope.provide(scope))
|
||||
const result = yield* input.effect.pipe(
|
||||
Scope.provide(scope),
|
||||
Effect.withSpan("Plugin.load", {
|
||||
attributes: {
|
||||
"plugin.id": input.id,
|
||||
},
|
||||
}),
|
||||
)
|
||||
hooks = [
|
||||
...hooks.filter((item) => item.id !== input.id),
|
||||
{
|
||||
|
||||
@@ -21,8 +21,10 @@ export const AccountPlugin = PluginV2.define({
|
||||
|
||||
return {
|
||||
"catalog.transform": Effect.fn(function* (evt) {
|
||||
const active = yield* accounts.activeAll().pipe(Effect.orDie)
|
||||
if (active.size === 0) return
|
||||
for (const item of evt.provider.list()) {
|
||||
const account = yield* accounts.active(Auth.ServiceID.make(item.provider.id)).pipe(Effect.orDie)
|
||||
const account = active.get(Auth.ServiceID.make(item.provider.id))
|
||||
if (!account) continue
|
||||
evt.provider.update(item.provider.id, (provider) => {
|
||||
provider.enabled = {
|
||||
|
||||
@@ -16,6 +16,7 @@ export class Info extends Schema.Class<Info>("Policy.Info")({
|
||||
export interface Interface {
|
||||
readonly load: (statements: Info[]) => EffectRuntime.Effect<void>
|
||||
readonly evaluate: (action: string, resource: string, fallback: Effect) => EffectRuntime.Effect<Effect>
|
||||
readonly hasStatements: () => boolean
|
||||
}
|
||||
|
||||
export class Service extends Context.Service<Service, Interface>()("@opencode/v2/Policy") {}
|
||||
@@ -30,6 +31,7 @@ export const layer = Layer.effect(
|
||||
load: EffectRuntime.fn("Policy.load")(function* (input) {
|
||||
statements = input
|
||||
}),
|
||||
hasStatements: () => statements.length > 0,
|
||||
evaluate: EffectRuntime.fn("Policy.evaluate")(function* (action, resource, fallback) {
|
||||
return (
|
||||
statements.findLast(
|
||||
|
||||
@@ -101,8 +101,8 @@ export class Info extends Schema.Class<Info>("ProviderV2.Info")({
|
||||
endpoint: Endpoint,
|
||||
options: Options,
|
||||
}) {
|
||||
static empty(providerID: ID) {
|
||||
return new Info({
|
||||
static empty(providerID: ID): Info {
|
||||
return {
|
||||
id: providerID,
|
||||
name: providerID,
|
||||
enabled: false,
|
||||
@@ -118,6 +118,6 @@ export class Info extends Schema.Class<Info>("ProviderV2.Info")({
|
||||
request: {},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-11
@@ -1,7 +1,7 @@
|
||||
export * as State from "./state"
|
||||
|
||||
import { Effect, Scope, Semaphore } from "effect"
|
||||
import { createDraft, finishDraft, type Draft, type Objectish } from "immer"
|
||||
import type { Draft, Objectish } from "immer"
|
||||
|
||||
export type Transform<Editor> = (editor: Editor) => void
|
||||
export type MakeEditor<State extends Objectish, Editor> = (draft: Draft<State>) => Editor
|
||||
@@ -24,17 +24,18 @@ export function create<State extends Objectish, Editor>(options: Options<State,
|
||||
let transforms: { update: Transform<Editor> }[] = []
|
||||
const semaphore = Semaphore.makeUnsafe(1)
|
||||
|
||||
const commit = Effect.fn("State.commit")(function* (draft: Draft<State>, reason?: string) {
|
||||
const api = options.editor(draft)
|
||||
const commit = Effect.fn("State.commit")(function* (next: State, reason?: string) {
|
||||
const api = options.editor(next as Draft<State>)
|
||||
if (options.finalize) yield* options.finalize(api, reason)
|
||||
state = finishDraft(draft) as State
|
||||
state = next
|
||||
})
|
||||
|
||||
const rebuild = Effect.fn("State.rebuild")(function* () {
|
||||
const draft = createDraft(options.initial())
|
||||
const api = options.editor(draft)
|
||||
for (const transform of transforms) transform.update(api)
|
||||
yield* commit(draft)
|
||||
const next = options.initial()
|
||||
const api = options.editor(next as Draft<State>)
|
||||
for (const transform of transforms)
|
||||
yield* Effect.sync(() => transform.update(api)).pipe(Effect.withSpan("State.rebuild.update", {}))
|
||||
yield* commit(next)
|
||||
}, semaphore.withPermit)
|
||||
|
||||
return {
|
||||
@@ -55,9 +56,9 @@ export function create<State extends Objectish, Editor>(options: Options<State,
|
||||
})
|
||||
}),
|
||||
update: Effect.fn("State.update")(function* (update, reason) {
|
||||
const draft = createDraft(state)
|
||||
yield* update(options.editor(draft))
|
||||
yield* commit(draft, reason)
|
||||
const api = options.editor(state as Draft<State>)
|
||||
yield* update(api)
|
||||
if (options.finalize) yield* options.finalize(api, reason)
|
||||
}, semaphore.withPermit),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from "fs/promises"
|
||||
import path from "path"
|
||||
import { describe, expect } from "bun:test"
|
||||
import { Effect } from "effect"
|
||||
import { Effect, Layer } from "effect"
|
||||
import { Catalog } from "@opencode-ai/core/catalog"
|
||||
import { LocationServiceMap } from "@opencode-ai/core/location-layer"
|
||||
import { PluginBoot } from "@opencode-ai/core/plugin/boot"
|
||||
@@ -9,8 +9,29 @@ import { ProviderV2 } from "@opencode-ai/core/provider"
|
||||
import { AbsolutePath } from "@opencode-ai/core/schema"
|
||||
import { tmpdir } from "./fixture/tmpdir"
|
||||
import { testEffect } from "./lib/effect"
|
||||
import { AppFileSystem } from "../src/filesystem"
|
||||
import { Auth } from "../src/auth"
|
||||
import { EventV2 } from "../src/event"
|
||||
import { Global } from "../src/global"
|
||||
import { ModelsDev } from "../src/models-dev"
|
||||
import { Npm } from "../src/npm"
|
||||
import { Project } from "../src/project"
|
||||
|
||||
const it = testEffect(LocationServiceMap.layer)
|
||||
const it = testEffect(
|
||||
LocationServiceMap.layer.pipe(
|
||||
Layer.provide(
|
||||
Layer.mergeAll(
|
||||
Project.defaultLayer,
|
||||
EventV2.defaultLayer,
|
||||
Auth.defaultLayer,
|
||||
Npm.defaultLayer,
|
||||
ModelsDev.defaultLayer,
|
||||
AppFileSystem.defaultLayer,
|
||||
Global.defaultLayer,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
describe("LocationServiceMap", () => {
|
||||
it.live("isolates location state while sharing location policy with catalog", () =>
|
||||
|
||||
@@ -1082,7 +1082,9 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
|
||||
<Home />
|
||||
</Match>
|
||||
<Match when={route.data.type === "session"}>
|
||||
<Session />
|
||||
<Show when={route.data.type === "session" ? route.data.sessionID : undefined} keyed>
|
||||
{(_) => <Session />}
|
||||
</Show>
|
||||
</Match>
|
||||
</Switch>
|
||||
{plugin()}
|
||||
|
||||
@@ -834,6 +834,12 @@ function getSyntaxRules(theme: Theme) {
|
||||
foreground: theme.syntaxFunction,
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["function.call", "function.method.call", "function.builtin"],
|
||||
style: {
|
||||
foreground: theme.syntaxFunction,
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["keyword"],
|
||||
style: {
|
||||
@@ -860,11 +866,17 @@ function getSyntaxRules(theme: Theme) {
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["variable", "variable.parameter", "function.method.call", "function.call"],
|
||||
scope: ["variable"],
|
||||
style: {
|
||||
foreground: theme.syntaxVariable,
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["variable.parameter", "variable.builtin", "module.builtin"],
|
||||
style: {
|
||||
foreground: theme.text,
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["variable.member", "function", "constructor"],
|
||||
style: {
|
||||
@@ -908,15 +920,21 @@ function getSyntaxRules(theme: Theme) {
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["variable.builtin", "type.builtin", "function.builtin", "module.builtin", "constant.builtin"],
|
||||
scope: ["type.builtin"],
|
||||
style: {
|
||||
foreground: theme.error,
|
||||
foreground: theme.syntaxType,
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["constant.builtin"],
|
||||
style: {
|
||||
foreground: theme.syntaxNumber,
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["variable.super"],
|
||||
style: {
|
||||
foreground: theme.error,
|
||||
foreground: theme.syntaxKeyword,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -210,7 +210,9 @@ export function Session() {
|
||||
const disabled = createMemo(() => permissions().length > 0 || questions().length > 0)
|
||||
|
||||
const pending = createMemo(() => {
|
||||
return messages().findLast((x) => x.role === "assistant" && !x.time.completed)?.id
|
||||
const completed = messages().findLast((x) => x.role === "assistant" && x.time.completed)?.id
|
||||
return messages().findLast((x) => x.role === "assistant" && !x.time.completed && (!completed || x.id > completed))
|
||||
?.id
|
||||
})
|
||||
|
||||
const lastAssistant = createMemo(() => {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Config } from "@/config/config"
|
||||
import { EventV2 } from "@opencode-ai/core/event"
|
||||
import { InstanceDisposed } from "@/server/event"
|
||||
import "@opencode-ai/core/account"
|
||||
import "@/server/event"
|
||||
import { Schema } from "effect"
|
||||
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
|
||||
import { described } from "./metadata"
|
||||
|
||||
@@ -25,7 +25,6 @@ import { or } from "drizzle-orm"
|
||||
import type { SQL } from "drizzle-orm"
|
||||
import { PartTable, SessionTable } from "@opencode-ai/core/session/sql"
|
||||
import { ProjectTable } from "@opencode-ai/core/project/sql"
|
||||
import { Storage } from "@/storage/storage"
|
||||
import * as Log from "@opencode-ai/core/util/log"
|
||||
import { MessageV2 } from "./message-v2"
|
||||
import type { InstanceContext } from "../project/instance-context"
|
||||
@@ -536,7 +535,7 @@ export type Patch = Omit<Partial<Info>, "time" | "share" | "summary" | "revert"
|
||||
export const layer: Layer.Layer<
|
||||
Service,
|
||||
never,
|
||||
BackgroundJob.Service | Storage.Service | RuntimeFlags.Service | Database.Service | EventV2Bridge.Service
|
||||
BackgroundJob.Service | RuntimeFlags.Service | Database.Service | EventV2Bridge.Service
|
||||
> = Layer.effect(
|
||||
Service,
|
||||
Effect.gen(function* () {
|
||||
@@ -544,7 +543,6 @@ export const layer: Layer.Layer<
|
||||
const database = yield* Database.Service
|
||||
const background = yield* BackgroundJob.Service
|
||||
const events = yield* EventV2Bridge.Service
|
||||
const storage = yield* Storage.Service
|
||||
const flags = yield* RuntimeFlags.Service
|
||||
|
||||
const locationForSession = Effect.fnUntraced(function* (sessionID: SessionID) {
|
||||
@@ -887,9 +885,8 @@ export const layer: Layer.Layer<
|
||||
})
|
||||
|
||||
const diff = Effect.fn("Session.diff")(function* (sessionID: SessionID) {
|
||||
return yield* storage
|
||||
.read<Snapshot.FileDiff[]>(["session_diff", sessionID])
|
||||
.pipe(Effect.orElseSucceed((): Snapshot.FileDiff[] => []))
|
||||
void sessionID
|
||||
return [] as Snapshot.FileDiff[]
|
||||
})
|
||||
|
||||
const messages: Interface["messages"] = Effect.fn("Session.messages")(function* (input) {
|
||||
@@ -1013,7 +1010,6 @@ export const layer: Layer.Layer<
|
||||
|
||||
export const defaultLayer = layer.pipe(
|
||||
Layer.provide(BackgroundJob.defaultLayer),
|
||||
Layer.provide(Storage.defaultLayer),
|
||||
Layer.provide(Database.defaultLayer),
|
||||
Layer.provide(EventV2Bridge.defaultLayer),
|
||||
Layer.provide(SessionV2.defaultLayer),
|
||||
|
||||
@@ -2,10 +2,9 @@ import { Effect, Layer, Context, Schema } from "effect"
|
||||
import { SessionLegacy } from "@opencode-ai/core/session/legacy"
|
||||
import { EventV2Bridge } from "@/event-v2-bridge"
|
||||
import { Snapshot } from "@/snapshot"
|
||||
import { Storage } from "@/storage/storage"
|
||||
import * as Session from "./session"
|
||||
import { MessageV2 } from "./message-v2"
|
||||
import { SessionID, MessageID } from "./schema"
|
||||
import { Config } from "@/config/config"
|
||||
|
||||
function unquoteGitPath(input: string) {
|
||||
if (!input.startsWith('"')) return input
|
||||
@@ -76,8 +75,8 @@ export const layer = Layer.effect(
|
||||
Effect.gen(function* () {
|
||||
const sessions = yield* Session.Service
|
||||
const snapshot = yield* Snapshot.Service
|
||||
const storage = yield* Storage.Service
|
||||
const events = yield* EventV2Bridge.Service
|
||||
const config = yield* Config.Service
|
||||
|
||||
const computeDiff = Effect.fn("SessionSummary.computeDiff")(function* (input: {
|
||||
messages: SessionLegacy.WithParts[]
|
||||
@@ -105,20 +104,18 @@ export const layer = Layer.effect(
|
||||
sessionID: SessionID
|
||||
messageID: MessageID
|
||||
}) {
|
||||
const all = yield* sessions.messages({ sessionID: input.sessionID }).pipe(Effect.orDie)
|
||||
if (!all.length) return
|
||||
|
||||
const diffs = yield* computeDiff({ messages: all })
|
||||
yield* sessions.setSummary({
|
||||
sessionID: input.sessionID,
|
||||
summary: {
|
||||
additions: diffs.reduce((sum, x) => sum + x.additions, 0),
|
||||
deletions: diffs.reduce((sum, x) => sum + x.deletions, 0),
|
||||
files: diffs.length,
|
||||
additions: 0,
|
||||
deletions: 0,
|
||||
files: 0,
|
||||
},
|
||||
})
|
||||
yield* storage.write(["session_diff", input.sessionID], diffs).pipe(Effect.ignore)
|
||||
yield* events.publish(Session.Event.Diff, { sessionID: input.sessionID, diff: diffs })
|
||||
yield* events.publish(Session.Event.Diff, { sessionID: input.sessionID, diff: [] })
|
||||
if ((yield* config.get()).snapshot === false) return
|
||||
const all = yield* sessions.messages({ sessionID: input.sessionID }).pipe(Effect.orDie)
|
||||
if (!all.length) return
|
||||
|
||||
const messages = all.filter(
|
||||
(m) => m.info.id === input.messageID || (m.info.role === "assistant" && m.info.parentID === input.messageID),
|
||||
@@ -131,18 +128,18 @@ export const layer = Layer.effect(
|
||||
})
|
||||
|
||||
const diff = Effect.fn("SessionSummary.diff")(function* (input: { sessionID: SessionID; messageID?: MessageID }) {
|
||||
const diffs = yield* storage
|
||||
.read<Snapshot.FileDiff[]>(["session_diff", input.sessionID])
|
||||
.pipe(Effect.catch(() => Effect.succeed([] as Snapshot.FileDiff[])))
|
||||
const next = diffs.map((item) => {
|
||||
if (!input.messageID) return []
|
||||
const message = (yield* sessions.messages({ sessionID: input.sessionID }).pipe(Effect.orDie)).find(
|
||||
(item) => item.info.id === input.messageID,
|
||||
)
|
||||
if (!message || message.info.role !== "user") return []
|
||||
const diffs = message.info.summary?.diffs ?? []
|
||||
return diffs.map((item) => {
|
||||
if (item.file === undefined) return item
|
||||
const file = unquoteGitPath(item.file)
|
||||
if (file === item.file) return item
|
||||
return { ...item, file }
|
||||
})
|
||||
const changed = next.some((item, i) => item.file !== diffs[i]?.file)
|
||||
if (changed) yield* storage.write(["session_diff", input.sessionID], next).pipe(Effect.ignore)
|
||||
return next
|
||||
})
|
||||
|
||||
return Service.of({ summarize, diff, computeDiff })
|
||||
@@ -153,8 +150,8 @@ export const defaultLayer = Layer.suspend(() =>
|
||||
layer.pipe(
|
||||
Layer.provide(Session.defaultLayer),
|
||||
Layer.provide(Snapshot.defaultLayer),
|
||||
Layer.provide(Storage.defaultLayer),
|
||||
Layer.provide(EventV2Bridge.defaultLayer),
|
||||
Layer.provide(Config.defaultLayer),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -384,10 +384,19 @@ export const layer: Layer.Layer<
|
||||
|
||||
function cleanDirectory(target: string) {
|
||||
return Effect.tryPromise({
|
||||
try: () =>
|
||||
import("fs/promises").then((fsp) =>
|
||||
fsp.rm(target, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }),
|
||||
),
|
||||
try: async () => {
|
||||
const fsp = await import("fs/promises")
|
||||
const attempts = process.platform === "win32" ? 50 : 5
|
||||
for (const attempt of Array.from({ length: attempts }, (_, i) => i)) {
|
||||
try {
|
||||
await fsp.rm(target, { recursive: true, force: true })
|
||||
return
|
||||
} catch (error) {
|
||||
if (attempt === attempts - 1) throw error
|
||||
await new Promise((resolve) => setTimeout(resolve, 100))
|
||||
}
|
||||
}
|
||||
},
|
||||
catch: (error) =>
|
||||
new RemoveFailedError({ message: errorMessage(error) || "Failed to remove git worktree directory" }),
|
||||
})
|
||||
|
||||
@@ -593,7 +593,9 @@ test("direct question body separates single-select checkmark from label", async
|
||||
}
|
||||
})
|
||||
|
||||
test("direct custom answer submits through keymap return binding", async () => {
|
||||
// OpenTUI currently segfaults while tearing down this textarea-backed keymap renderer.
|
||||
// Re-enable after the runtime fix.
|
||||
test.skip("direct custom answer submits through keymap return binding", async () => {
|
||||
const question = {
|
||||
id: "question-1",
|
||||
sessionID: "session-1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect, test } from "bun:test"
|
||||
|
||||
const { DEFAULT_THEMES, allThemes, addTheme, hasTheme, resolveTheme } = await import(
|
||||
const { DEFAULT_THEMES, allThemes, addTheme, generateSyntax, hasTheme, resolveTheme } = await import(
|
||||
"../../../src/cli/cmd/tui/context/theme"
|
||||
)
|
||||
|
||||
@@ -49,3 +49,17 @@ test("resolveTheme rejects circular color refs", () => {
|
||||
|
||||
expect(() => resolveTheme(item, "dark")).toThrow("Circular color reference")
|
||||
})
|
||||
|
||||
test("generateSyntax maps calls and builtins away from error red", () => {
|
||||
const theme = resolveTheme(DEFAULT_THEMES.opencode, "dark")
|
||||
const syntax = generateSyntax(theme)
|
||||
|
||||
try {
|
||||
expect(syntax.getStyle("function.call")?.fg?.equals(theme.syntaxFunction)).toBe(true)
|
||||
expect(syntax.getStyle("function.builtin")?.fg?.equals(theme.syntaxFunction)).toBe(true)
|
||||
expect(syntax.getStyle("variable.parameter")?.fg?.equals(theme.text)).toBe(true)
|
||||
expect(syntax.getStyle("function.builtin")?.fg?.equals(theme.error)).toBe(false)
|
||||
} finally {
|
||||
syntax.destroy()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -19,6 +19,9 @@ const apiLayer = HttpRouter.serve(
|
||||
HttpApiBuilder.layer(RootHttpApi).pipe(
|
||||
Layer.provide([controlHandlers, globalHandlers]),
|
||||
Layer.provide([authorizationLayer, schemaErrorLayer]),
|
||||
// Raw HttpApi routes expose an opaque handler context at the request boundary.
|
||||
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
|
||||
HttpRouter.provideRequest(Layer.succeedContext(Context.empty() as Context.Context<unknown>)),
|
||||
),
|
||||
{ disableListenLog: true, disableLogger: true },
|
||||
).pipe(
|
||||
@@ -33,9 +36,6 @@ const apiLayer = HttpRouter.serve(
|
||||
}),
|
||||
),
|
||||
Layer.provide(ServerAuth.Config.layer({ password: Option.none(), username: "opencode" })),
|
||||
// Raw HttpApi routes expose an opaque handler context at the web boundary.
|
||||
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
|
||||
Layer.provide(Layer.succeedContext(Context.empty() as Context.Context<unknown>)),
|
||||
)
|
||||
const it = testEffect(apiLayer)
|
||||
|
||||
|
||||
@@ -4,16 +4,20 @@
|
||||
* the response was Schema-encoded against `Snapshot.FileDiff` with
|
||||
* `patch: Schema.String` (required), so any session whose stored
|
||||
* `summary_diffs` had a row without `patch` returned HTTP 400 and the
|
||||
* session never loaded.
|
||||
* session never loaded. Legacy session-level diffs are no longer surfaced,
|
||||
* but the endpoint remains compatible and must still return successfully.
|
||||
*
|
||||
* This test inserts a session row with a missing-patch diff entry and
|
||||
* asserts that GET /session/<id>/diff returns 200 with the row intact.
|
||||
* asserts that GET /session/<id>/diff returns 200 with empty data.
|
||||
*/
|
||||
import { afterEach, describe, expect } from "bun:test"
|
||||
import { Effect, Layer } from "effect"
|
||||
import { SessionPaths } from "@/server/routes/instance/httpapi/groups/session"
|
||||
import { Session } from "@/session/session"
|
||||
import { Storage } from "@/storage/storage"
|
||||
import { SessionLegacy } from "@opencode-ai/core/session/legacy"
|
||||
import { MessageID } from "@/session/schema"
|
||||
import { ProviderV2 } from "@opencode-ai/core/provider"
|
||||
import { resetDatabase } from "../fixture/db"
|
||||
import { disposeAllInstances, TestInstance } from "../fixture/fixture"
|
||||
import { testEffect } from "../lib/effect"
|
||||
@@ -38,7 +42,7 @@ const withSession = (input?: Parameters<Session.Interface["create"]>[0]) =>
|
||||
|
||||
describe("session diff with missing patch (#26574)", () => {
|
||||
it.instance(
|
||||
"GET /session/<id>/diff returns 200 when summary_diffs row has no patch",
|
||||
"GET /session/<id>/diff ignores legacy session-level diff storage",
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const test = yield* TestInstance
|
||||
@@ -57,15 +61,37 @@ describe("session diff with missing patch (#26574)", () => {
|
||||
)
|
||||
|
||||
expect(response.status).toBe(200)
|
||||
const body = (yield* response.json) as Array<{
|
||||
file: string
|
||||
patch?: string
|
||||
additions: number
|
||||
}>
|
||||
expect(body).toHaveLength(1)
|
||||
expect(body[0]?.file).toBe("legacy.txt")
|
||||
expect(body[0]?.additions).toBe(1)
|
||||
expect(body[0]?.patch).toBeUndefined()
|
||||
expect(yield* response.json).toEqual([])
|
||||
}),
|
||||
{ git: true, config: { formatter: false, lsp: false } },
|
||||
)
|
||||
|
||||
it.instance(
|
||||
"GET /session/<id>/diff returns requested turn diffs",
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const test = yield* TestInstance
|
||||
const session = yield* withSession({ title: "turn-diff" })
|
||||
const messageID = MessageID.ascending()
|
||||
yield* Session.use.updateMessage({
|
||||
id: messageID,
|
||||
sessionID: session.id,
|
||||
role: "user",
|
||||
time: { created: Date.now() },
|
||||
agent: "build",
|
||||
model: { providerID: ProviderV2.ID.make("test"), modelID: ProviderV2.ModelID.make("model") },
|
||||
summary: {
|
||||
diffs: [{ file: "turn.ts", additions: 1, deletions: 0, status: "modified" }],
|
||||
},
|
||||
} satisfies SessionLegacy.User)
|
||||
|
||||
const response = yield* requestInDirectory(
|
||||
`${pathFor(SessionPaths.diff, { sessionID: session.id })}?messageID=${messageID}`,
|
||||
test.directory,
|
||||
)
|
||||
|
||||
expect(response.status).toBe(200)
|
||||
expect(yield* response.json).toEqual([{ file: "turn.ts", additions: 1, deletions: 0, status: "modified" }])
|
||||
}),
|
||||
{ git: true, config: { formatter: false, lsp: false } },
|
||||
)
|
||||
|
||||
@@ -257,15 +257,19 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () =>
|
||||
|
||||
// Verify the tool call completed (in the first assistant message)
|
||||
const allMsgs = yield* MessageV2.filterCompactedEffect(session.id)
|
||||
const user = allMsgs.find(
|
||||
(msg): msg is SessionLegacy.WithParts & { info: SessionLegacy.User } => msg.info.role === "user",
|
||||
)
|
||||
const tool = allMsgs
|
||||
.flatMap((m) => m.parts)
|
||||
.find((p): p is SessionLegacy.ToolPart => p.type === "tool" && p.tool === "bash")
|
||||
expect(tool?.state.status).toBe("completed")
|
||||
if (!user) throw new Error("Expected user message")
|
||||
|
||||
// Poll for diff — summarize() is fire-and-forget
|
||||
// Poll for the turn diff — summarize() is fire-and-forget.
|
||||
let diff: Array<{ file?: string }> = []
|
||||
for (let i = 0; i < 50; i++) {
|
||||
diff = yield* summary.diff({ sessionID: session.id })
|
||||
diff = yield* summary.diff({ sessionID: session.id, messageID: user.info.id })
|
||||
if (diff.length > 0) break
|
||||
yield* Effect.sleep("100 millis")
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ OpenCode Go هو اشتراك منخفض التكلفة — **$5 للشهر ال
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
تستند التقديرات إلى متوسطات أنماط الطلبات المرصودة:
|
||||
تستند التقديرات إلى متوسط أنماط الطلبات المرصودة:
|
||||
|
||||
- GLM-5/5.1 — 700 input، و52,000 cached، و150 output tokens لكل طلب
|
||||
- Kimi K2.5/K2.6 — 870 input، و55,000 cached، و200 output tokens لكل طلب
|
||||
@@ -105,6 +105,23 @@ OpenCode Go هو اشتراك منخفض التكلفة — **$5 للشهر ال
|
||||
- MiMo-V2.5 — 830 input، و71,500 cached، و295 output tokens لكل طلب
|
||||
- MiMo-V2.5-Pro — 790 input، و86,000 cached، و305 output tokens لكل طلب
|
||||
|
||||
تستند التقديرات أيضًا إلى الأسعار التالية لكل 1M tokens:
|
||||
|
||||
| النموذج | الإدخال | الإخراج | القراءة المخزنة | الكتابة المخزنة |
|
||||
| ----------------- | ------- | ------- | --------------- | --------------- |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
يمكنك تتبّع استخدامك الحالي في **<a href={console}>console</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -85,8 +85,10 @@ OpenCode Zen هي بوابة AI تتيح لك الوصول إلى هذه الن
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -132,6 +134,7 @@ https://opencode.ai/zen/v1/models
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -115,6 +115,23 @@ Procjene se zasnivaju na zapaženim prosječnim obrascima zahtjeva:
|
||||
- MiMo-V2.5 — 830 ulaznih, 71,500 keširanih, 295 izlaznih tokena po zahtjevu
|
||||
- MiMo-V2.5-Pro — 790 ulaznih, 86,000 keširanih, 305 izlaznih tokena po zahtjevu
|
||||
|
||||
Procjene se također zasnivaju na sljedećim cijenama po 1M tokena:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Svoju trenutnu potrošnju možete pratiti u **<a href={console}>konzoli</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -90,8 +90,10 @@ Našim modelima možete pristupiti i preko sljedećih API endpointa.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ Podržavamo pay-as-you-go model. Ispod su cijene **po 1M tokena**.
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -115,6 +115,23 @@ Estimaterne er baseret på observerede gennemsnitlige anmodningsmønstre:
|
||||
- MiMo-V2.5 — 830 input, 71.500 cachelagrede, 295 output-tokens pr. anmodning
|
||||
- MiMo-V2.5-Pro — 790 input, 86.000 cachelagrede, 305 output-tokens pr. anmodning
|
||||
|
||||
Estimaterne er også baseret på følgende priser pr. 1M tokens:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Du kan spore dit nuværende forbrug i **<a href={console}>konsollen</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -90,8 +90,10 @@ Du kan også få adgang til vores modeller gennem følgende API-endpoints.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ Vi understøtter en pay-as-you-go-model. Nedenfor er priserne **pr. 1M tokens**.
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -107,6 +107,23 @@ Die Schätzungen basieren auf beobachteten durchschnittlichen Anfragemustern:
|
||||
- MiMo-V2.5 — 830 Input-, 71.500 Cached-, 295 Output-Tokens pro Anfrage
|
||||
- MiMo-V2.5-Pro — 790 Input-, 86.000 Cached-, 305 Output-Tokens pro Anfrage
|
||||
|
||||
Die Schätzungen basieren außerdem auf den folgenden Preisen pro 1M Tokens:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Du kannst deine aktuelle Nutzung in der **<a href={console}>Console</a>** verfolgen.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -81,8 +81,10 @@ Du kannst auch über die folgenden API-Endpunkte auf unsere Modelle zugreifen.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -128,6 +130,7 @@ Wir unterstützen ein Pay-as-you-go-Modell. Unten findest du die Preise **pro 1M
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -115,6 +115,23 @@ Las estimaciones se basan en los patrones de peticiones promedio observados:
|
||||
- MiMo-V2.5 — 830 tokens de entrada, 71,500 en caché, 295 tokens de salida por petición
|
||||
- MiMo-V2.5-Pro — 790 tokens de entrada, 86,000 en caché, 305 tokens de salida por petición
|
||||
|
||||
Las estimaciones también se basan en los siguientes precios por 1M tokens:
|
||||
|
||||
| Modelo | Entrada | Salida | Lectura en caché | Escritura en caché |
|
||||
| ----------------- | ------- | ------ | ---------------- | ------------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Puedes realizar un seguimiento de tu uso actual en la **<a href={console}>consola</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -90,8 +90,10 @@ También puedes acceder a nuestros modelos a través de los siguientes endpoints
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ Admitimos un modelo de pago por uso. A continuación se muestran los precios **p
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -93,7 +93,7 @@ Le tableau ci-dessous fournit une estimation du nombre de requêtes basée sur d
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
Les estimations sont basées sur les modèles de requêtes moyens observés :
|
||||
Les estimations sont basées sur les schémas de requêtes moyens observés :
|
||||
|
||||
- GLM-5/5.1 — 700 tokens en entrée, 52,000 en cache, 150 tokens en sortie par requête
|
||||
- Kimi K2.5/K2.6 — 870 tokens en entrée, 55,000 en cache, 200 tokens en sortie par requête
|
||||
@@ -105,6 +105,23 @@ Les estimations sont basées sur les modèles de requêtes moyens observés :
|
||||
- MiMo-V2.5 — 830 tokens en entrée, 71,500 en cache, 295 tokens en sortie par requête
|
||||
- MiMo-V2.5-Pro — 790 tokens en entrée, 86,000 en cache, 305 tokens en sortie par requête
|
||||
|
||||
Les estimations sont également basées sur les prix suivants par 1M tokens :
|
||||
|
||||
| Modèle | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Vous pouvez suivre votre utilisation actuelle dans la **<a href={console}>console</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -81,8 +81,10 @@ Vous pouvez également accéder à nos modèles via les points de terminaison AP
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -128,6 +130,7 @@ Nous prenons en charge un modèle de paiement à l'utilisation. Vous trouverez c
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -103,7 +103,7 @@ The table below provides an estimated request count based on typical Go usage pa
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
Estimates are based on observed average request patterns:
|
||||
The estimates are based on observed average request patterns:
|
||||
|
||||
- GLM-5/5.1 — 700 input, 52,000 cached, 150 output tokens per request
|
||||
- Kimi K2.5/K2.6 — 870 input, 55,000 cached, 200 output tokens per request
|
||||
@@ -115,6 +115,23 @@ Estimates are based on observed average request patterns:
|
||||
- Qwen3.7 Max — 420 input, 66,000 cached, 200 output tokens per request
|
||||
- Qwen3.6 Plus — 500 input, 57,000 cached, 190 output tokens per request
|
||||
|
||||
The estimates are also based on the following prices per 1M tokens:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
You can track your current usage in the **<a href={console}>console</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -113,6 +113,23 @@ Le stime si basano sui pattern medi di richieste osservati:
|
||||
- MiMo-V2.5 — 830 di input, 71.500 in cache, 295 token di output per richiesta
|
||||
- MiMo-V2.5-Pro — 790 di input, 86.000 in cache, 305 token di output per richiesta
|
||||
|
||||
Le stime si basano anche sui seguenti prezzi per 1M token:
|
||||
|
||||
| Modello | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Puoi monitorare il tuo utilizzo attuale nella **<a href={console}>console</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -90,8 +90,10 @@ Puoi anche accedere ai nostri modelli tramite i seguenti endpoint API.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ Supportiamo un modello pay-as-you-go. Qui sotto trovi i prezzi **per 1M token**.
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -105,6 +105,23 @@ OpenCode Goには以下の制限が含まれています:
|
||||
- MiMo-V2.5 — リクエストあたり 入力 830トークン、キャッシュ 71,500トークン、出力 295トークン
|
||||
- MiMo-V2.5-Pro — リクエストあたり 入力 790トークン、キャッシュ 86,000トークン、出力 305トークン
|
||||
|
||||
推定値は、100万トークンあたりの以下の価格にも基づいています:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
現在の利用状況は**<a href={console}>コンソール</a>**で追跡できます。
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -81,8 +81,10 @@ OpenCode Zen は、OpenCode のほかのプロバイダーと同じように動
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -128,6 +130,7 @@ https://opencode.ai/zen/v1/models
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -93,7 +93,7 @@ OpenCode Go에는 다음과 같은 한도가 포함됩니다.
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
예상치는 관찰된 평균 요청 패턴을 기준으로 합니다.
|
||||
이 예상치는 관찰된 평균 요청 패턴을 기준으로 합니다.
|
||||
|
||||
- GLM-5/5.1 — 요청당 입력 700, 캐시 52,000, 출력 토큰 150
|
||||
- Kimi K2.5/K2.6 — 요청당 입력 870, 캐시 55,000, 출력 토큰 200
|
||||
@@ -105,6 +105,23 @@ OpenCode Go에는 다음과 같은 한도가 포함됩니다.
|
||||
- MiMo-V2.5 — 요청당 입력 830, 캐시 71,500, 출력 토큰 295
|
||||
- MiMo-V2.5-Pro — 요청당 입력 790, 캐시 86,000, 출력 토큰 305
|
||||
|
||||
이 예상치는 또한 1M tokens당 다음 가격을 기준으로 합니다.
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
현재 사용량은 **<a href={console}>console</a>**에서 확인할 수 있습니다.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -81,8 +81,10 @@ OpenCode Zen은 OpenCode의 다른 provider와 똑같이 작동합니다.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -128,6 +130,7 @@ https://opencode.ai/zen/v1/models
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -115,6 +115,23 @@ Estimatene er basert på observerte gjennomsnittlige forespørselsmønstre:
|
||||
- MiMo-V2.5 — 830 input, 71 500 bufret, 295 output-tokens per forespørsel
|
||||
- MiMo-V2.5-Pro — 790 input, 86 000 bufret, 305 output-tokens per forespørsel
|
||||
|
||||
Estimatene er også basert på følgende priser per 1M tokens:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Du kan spore din nåværende bruk i **<a href={console}>konsollen</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -90,8 +90,10 @@ Du kan også få tilgang til modellene våre gjennom følgende API-endepunkter.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ Vi støtter en pay-as-you-go-modell. Nedenfor er prisene **per 1M tokens**.
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -97,7 +97,7 @@ Poniższa tabela przedstawia szacunkową liczbę żądań na podstawie typowych
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
Szacunki opierają się na zaobserwowanych średnich wzorcach żądań:
|
||||
Szacunki te opierają się na zaobserwowanych średnich wzorcach żądań:
|
||||
|
||||
- GLM-5/5.1 — 700 tokenów wejściowych, 52 000 w pamięci podręcznej, 150 tokenów wyjściowych na żądanie
|
||||
- Kimi K2.5/K2.6 — 870 tokenów wejściowych, 55 000 w pamięci podręcznej, 200 tokenów wyjściowych na żądanie
|
||||
@@ -109,6 +109,23 @@ Szacunki opierają się na zaobserwowanych średnich wzorcach żądań:
|
||||
- MiMo-V2.5 — 830 tokenów wejściowych, 71 500 w pamięci podręcznej, 295 tokenów wyjściowych na żądanie
|
||||
- MiMo-V2.5-Pro — 790 tokenów wejściowych, 86 000 w pamięci podręcznej, 305 tokenów wyjściowych na żądanie
|
||||
|
||||
Szacunki opierają się również na następujących cenach za 1M tokenów:
|
||||
|
||||
| Model | Wejście | Wyjście | Odczyt z cache | Zapis do cache |
|
||||
| ----------------- | ------- | ------- | -------------- | -------------- |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Możesz śledzić swoje bieżące zużycie w **<a href={console}>konsoli</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -90,8 +90,10 @@ Możesz też uzyskać dostęp do naszych modeli przez poniższe endpointy API.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ Obsługujemy model pay-as-you-go. Poniżej znajdują się ceny **za 1M tokenów*
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -103,7 +103,7 @@ A tabela abaixo fornece uma contagem estimada de requisições com base nos padr
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
As estimativas baseiam-se nos padrões médios de requisições observados:
|
||||
As estimativas se baseiam nos padrões médios de requisições observados:
|
||||
|
||||
- GLM-5/5.1 — 700 tokens de entrada, 52.000 em cache, 150 tokens de saída por requisição
|
||||
- Kimi K2.5/K2.6 — 870 tokens de entrada, 55.000 em cache, 200 tokens de saída por requisição
|
||||
@@ -115,6 +115,23 @@ As estimativas baseiam-se nos padrões médios de requisições observados:
|
||||
- MiMo-V2.5 — 830 tokens de entrada, 71.500 em cache, 295 tokens de saída por requisição
|
||||
- MiMo-V2.5-Pro — 790 tokens de entrada, 86.000 em cache, 305 tokens de saída por requisição
|
||||
|
||||
As estimativas também se baseiam nos seguintes preços por 1M tokens:
|
||||
|
||||
| Modelo | Entrada | Saída | Leitura em cache | Escrita em cache |
|
||||
| ----------------- | ------- | ----- | ---------------- | ---------------- |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Você pode acompanhar o seu uso atual no **<a href={console}>console</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -81,8 +81,10 @@ Você também pode acessar nossos modelos pelos seguintes endpoints de API.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -128,6 +130,7 @@ Oferecemos um modelo pay-as-you-go. Abaixo estão os preços **por 1M tokens**.
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -103,7 +103,7 @@ OpenCode Go включает следующие лимиты:
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
Оценки основаны на наблюдаемых средних показателях запросов:
|
||||
Эти оценки основаны на наблюдаемых средних показателях запросов:
|
||||
|
||||
- GLM-5/5.1 — 700 входных, 52,000 кешированных, 150 выходных токенов на запрос
|
||||
- Kimi K2.5/K2.6 — 870 входных, 55,000 кешированных, 200 выходных токенов на запрос
|
||||
@@ -115,6 +115,23 @@ OpenCode Go включает следующие лимиты:
|
||||
- MiMo-V2.5 — 830 входных, 71,500 кешированных, 295 выходных токенов на запрос
|
||||
- MiMo-V2.5-Pro — 790 входных, 86,000 кешированных, 305 выходных токенов на запрос
|
||||
|
||||
Эти оценки также основаны на следующих ценах за 1M токенов:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Вы можете отслеживать текущее использование в **<a href={console}>консоли</a>**.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -90,8 +90,10 @@ OpenCode Zen работает как любой другой провайдер
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ https://opencode.ai/zen/v1/models
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -93,7 +93,7 @@ OpenCode Go มีขีดจำกัดดังต่อไปนี้:
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
การประมาณการอ้างอิงจากรูปแบบการใช้งาน request โดยเฉลี่ยที่สังเกตพบ:
|
||||
การประมาณการนี้อ้างอิงจากรูปแบบการใช้งาน request โดยเฉลี่ยที่สังเกตพบ:
|
||||
|
||||
- GLM-5/5.1 — 700 input, 52,000 cached, 150 output tokens ต่อ request
|
||||
- Kimi K2.5/K2.6 — 870 input, 55,000 cached, 200 output tokens ต่อ request
|
||||
@@ -105,6 +105,23 @@ OpenCode Go มีขีดจำกัดดังต่อไปนี้:
|
||||
- MiMo-V2.5 — 830 input, 71,500 cached, 295 output tokens ต่อ request
|
||||
- MiMo-V2.5-Pro — 790 input, 86,000 cached, 305 output tokens ต่อ request
|
||||
|
||||
การประมาณการนี้ยังอ้างอิงจากราคาต่อ 1M tokens ดังต่อไปนี้:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
คุณสามารถติดตามการใช้งานปัจจุบันของคุณได้ใน **<a href={console}>console</a>**
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -83,8 +83,10 @@ OpenCode Zen ทำงานเหมือน provider อื่น ๆ ใน
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -130,6 +132,7 @@ https://opencode.ai/zen/v1/models
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -93,7 +93,7 @@ Aşağıdaki tablo, tipik Go kullanım modellerine dayalı tahmini bir istek say
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
Tahminler, gözlemlenen ortalama istek modellerine dayanmaktadır:
|
||||
Tahminler, gözlemlenen ortalama istek modellerine dayanır:
|
||||
|
||||
- GLM-5/5.1 — İstek başına 700 girdi, 52.000 önbelleğe alınmış, 150 çıktı token'ı
|
||||
- Kimi K2.5/K2.6 — İstek başına 870 girdi, 55.000 önbelleğe alınmış, 200 çıktı token'ı
|
||||
@@ -105,6 +105,23 @@ Tahminler, gözlemlenen ortalama istek modellerine dayanmaktadır:
|
||||
- MiMo-V2.5 — İstek başına 830 girdi, 71.500 önbelleğe alınmış, 295 çıktı token'ı
|
||||
- MiMo-V2.5-Pro — İstek başına 790 girdi, 86.000 önbelleğe alınmış, 305 çıktı token'ı
|
||||
|
||||
Tahminler ayrıca 1M token başına aşağıdaki fiyatlara da dayanır:
|
||||
|
||||
| Model | Input | Output | Cached Read | Cached Write |
|
||||
| ----------------- | ----- | ------ | ----------- | ------------ |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
Mevcut kullanımınızı **<a href={console}>konsoldan</a>** takip edebilirsiniz.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -81,8 +81,10 @@ Modellerimize aşağıdaki API uç noktaları aracılığıyla da erişebilirsin
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -128,6 +130,7 @@ Kullandıkça öde modelini destekliyoruz. Aşağıda **1M token başına** fiya
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -90,8 +90,10 @@ You can also access our models through the following API endpoints.
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -139,6 +141,7 @@ We support a pay-as-you-go model. Below are the prices **per 1M tokens**.
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -105,6 +105,23 @@ OpenCode Go 包含以下限制:
|
||||
- Qwen3.7 Max — 每次请求 420 个输入 token,66,000 个缓存 token,200 个输出 token
|
||||
- Qwen3.6 Plus — 每次请求 500 个输入 token,57,000 个缓存 token,190 个输出 token
|
||||
|
||||
预估值还基于以下每 1M tokens 的价格:
|
||||
|
||||
| 模型 | 输入 | 输出 | 缓存读取 | 缓存写入 |
|
||||
| ----------------- | ----- | ----- | -------- | -------- |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
你可以在 **<a href={console}>控制台</a>** 中跟踪你当前的使用情况。
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -81,8 +81,10 @@ OpenCode Zen 的工作方式与 OpenCode 中的任何其他提供商相同。
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -128,6 +130,7 @@ https://opencode.ai/zen/v1/models
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
@@ -93,7 +93,7 @@ OpenCode Go 包含以下限制:
|
||||
| DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 |
|
||||
| DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 |
|
||||
|
||||
預估值是基於觀察到的平均請求模式:
|
||||
這些預估值是基於觀察到的平均請求模式:
|
||||
|
||||
- GLM-5/5.1 — 每次請求 700 個輸入 token、52,000 個快取 token、150 個輸出 token
|
||||
- Kimi K2.5/K2.6 — 每次請求 870 個輸入 token、55,000 個快取 token、200 個輸出 token
|
||||
@@ -105,6 +105,23 @@ OpenCode Go 包含以下限制:
|
||||
- MiMo-V2.5 — 每次請求 830 個輸入 token、71,500 個快取 token、295 個輸出 token
|
||||
- MiMo-V2.5-Pro — 每次請求 790 個輸入 token、86,000 個快取 token、305 個輸出 token
|
||||
|
||||
這些預估值也基於以下每 1M tokens 的價格:
|
||||
|
||||
| 模型 | 輸入 | 輸出 | 快取讀取 | 快取寫入 |
|
||||
| ----------------- | ----- | ----- | -------- | -------- |
|
||||
| GLM-5.1 | $1.40 | $4.40 | $0.26 | - |
|
||||
| GLM-5 | $1.00 | $3.20 | $0.20 | - |
|
||||
| Kimi K2.6 | $0.95 | $4.00 | $0.16 | - |
|
||||
| Kimi K2.5 | $0.60 | $3.00 | $0.10 | - |
|
||||
| MiMo V2.5 | $0.14 | $0.28 | $0.0028 | - |
|
||||
| MiMo V2.5 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| MiniMax M2.7 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| MiniMax M2.5 | $0.30 | $1.20 | $0.06 | $0.375 |
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| DeepSeek V4 Pro | $1.74 | $3.48 | $0.0145 | - |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.0028 | - |
|
||||
|
||||
您可以在 **<a href={console}>console</a>** 中追蹤您目前的使用量。
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -85,8 +85,10 @@ OpenCode Zen 的運作方式和 OpenCode 中的其他供應商一樣。
|
||||
| Gemini 3.5 Flash | gemini-3.5-flash | `https://opencode.ai/zen/v1/models/gemini-3.5-flash` | `@ai-sdk/google` |
|
||||
| Gemini 3.1 Pro | gemini-3.1-pro | `https://opencode.ai/zen/v1/models/gemini-3.1-pro` | `@ai-sdk/google` |
|
||||
| Gemini 3 Flash | gemini-3-flash | `https://opencode.ai/zen/v1/models/gemini-3-flash` | `@ai-sdk/google` |
|
||||
| Qwen3.7 Max | qwen3.7-max | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.6 Plus | qwen3.6-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| Qwen3.5 Plus | qwen3.5-plus | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
|
||||
| DeepSeek V4 Flash | deepseek-v4-flash | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.7 | minimax-m2.7 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| MiniMax M2.5 | minimax-m2.5 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
| GLM 5.1 | glm-5.1 | `https://opencode.ai/zen/v1/chat/completions` | `@ai-sdk/openai-compatible` |
|
||||
@@ -133,6 +135,7 @@ https://opencode.ai/zen/v1/models
|
||||
| Qwen3.7 Max | $2.50 | $7.50 | $0.50 | $3.125 |
|
||||
| Qwen3.6 Plus | $0.50 | $3.00 | $0.05 | $0.625 |
|
||||
| Qwen3.5 Plus | $0.20 | $1.20 | $0.02 | $0.25 |
|
||||
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.03 | - |
|
||||
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - |
|
||||
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
| Claude Opus 4.7 | $5.00 | $25.00 | $0.50 | $6.25 |
|
||||
|
||||
Reference in New Issue
Block a user