Add -m, --model <provider/model> option to oh-my-opencode run command. Allows users to override the model while keeping the agent unchanged. Changes: - Add model?: string to RunOptions interface - Create model-resolver.ts to parse provider/model format - Add model-resolver.test.ts with 7 test cases (TDD) - Add --model CLI option with help text examples - Wire resolveRunModel in runner.ts and pass to promptAsync - Export resolveRunModel from barrel (index.ts) Example usage: bunx oh-my-opencode run --model anthropic/claude-sonnet-4 "Fix the bug" bunx oh-my-opencode run --agent Sisyphus --model openai/gpt-5.4 "Task"
11 lines
562 B
TypeScript
11 lines
562 B
TypeScript
export { run } from "./runner"
|
|
export { resolveRunAgent } from "./agent-resolver"
|
|
export { resolveRunModel } from "./model-resolver"
|
|
export { createServerConnection } from "./server-connection"
|
|
export { resolveSession } from "./session-resolver"
|
|
export { createJsonOutputManager } from "./json-output"
|
|
export { executeOnCompleteHook } from "./on-complete-hook"
|
|
export { createEventState, processEvents, serializeError } from "./events"
|
|
export type { EventState } from "./events"
|
|
export type { RunOptions, RunContext, RunResult, ServerConnection } from "./types"
|