Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ Translate (v0.4 — multi-language draft clone):
Options:
--from <lang> Source language (default: "auto")
--api-key <key> Override ANTHROPIC_API_KEY env var
--model <id> Model (default: claude-haiku-4-5-20251001)
--model <id> Model (default: claude-haiku-5-5)
--dry-run List what would be translated, no API call

Migrate (v0.4 — survive JianYing/CapCut version jumps):
Expand Down
7 changes: 4 additions & 3 deletions src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface TranslateOptions {
to: string; // target language (free-form, e.g. "Spanish", "de", "Mandarin Chinese")
from?: string; // source language; default "auto"
apiKey?: string; // overrides ANTHROPIC_API_KEY env var
model?: string; // default "claude-haiku-4-5-20251001"
model?: string; // default "claude-haiku-5-5"
dryRun?: boolean;
outPath: string; // required: where to write the translated draft
}
Expand Down Expand Up @@ -55,7 +55,7 @@ export async function translateDraft(draft: Draft, opts: TranslateOptions): Prom
"Get one at https://console.anthropic.com/. (Use --dry-run to see what would be translated without calling the API.)",
);
}
const model = opts.model ?? "claude-haiku-4-5-20251001";
const model = opts.model ?? "claude-haiku-5-5";

const translations = await callAnthropicBatch(
apiKey,
Expand Down Expand Up @@ -112,7 +112,8 @@ async function callAnthropicBatch(
},
body: JSON.stringify({
model,
max_tokens: 4096,
max_tokens: 16000,
output_config: { effort: "low" },
messages: [{ role: "user", content: prompt }],
}),
});
Expand Down
Loading