ocpipe 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocpipe",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "SDK for LLM pipelines with OpenCode and Zod",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -31,7 +31,7 @@
31
31
  "dependencies": {},
32
32
  "peerDependencies": {
33
33
  "zod": "4.3.6",
34
- "@anthropic-ai/claude-agent-sdk": "0.2.62"
34
+ "@anthropic-ai/claude-agent-sdk": "0.2.69"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@anthropic-ai/claude-agent-sdk": {
package/src/agent.ts CHANGED
@@ -34,7 +34,15 @@ export async function runAgent(
34
34
  async function runOpencodeAgent(
35
35
  options: RunAgentOptions,
36
36
  ): Promise<RunAgentResult> {
37
- const { prompt, agent, model, sessionId, timeoutSec = 3600, workdir, signal } = options
37
+ const {
38
+ prompt,
39
+ agent,
40
+ model,
41
+ sessionId,
42
+ timeoutSec = 3600,
43
+ workdir,
44
+ signal,
45
+ } = options
38
46
 
39
47
  if (!model.providerID) {
40
48
  throw new Error('providerID is required for OpenCode backend')
@@ -75,6 +83,17 @@ async function runOpencodeAgent(
75
83
  args.push('--session', sessionId)
76
84
  }
77
85
 
86
+ if (model.variant) {
87
+ args.push('--model-variant', model.variant)
88
+ }
89
+
90
+ if (model.variantThinkingBudget !== undefined) {
91
+ args.push(
92
+ '--model-variant-thinking-budget',
93
+ String(model.variantThinkingBudget),
94
+ )
95
+ }
96
+
78
97
  return new Promise((resolve, reject) => {
79
98
  const opencodeCmd = getOpencodeCommand(args)
80
99
  console.error(
package/src/types.ts CHANGED
@@ -42,7 +42,9 @@ export interface ClaudeCodeOptions {
42
42
  * System prompt for the Claude Code session.
43
43
  * Can be a full string or use the preset format with append.
44
44
  */
45
- systemPrompt?: string | { type: 'preset'; preset: 'claude_code'; append: string }
45
+ systemPrompt?:
46
+ | string
47
+ | { type: 'preset'; preset: 'claude_code'; append: string }
46
48
  /**
47
49
  * Subagent definitions for parallel task dispatch via the Task tool.
48
50
  * Keys are agent names, values are agent definitions.
@@ -62,6 +64,10 @@ export interface ModelConfig {
62
64
  /** Provider ID (required for OpenCode, ignored for Claude Code). */
63
65
  providerID?: string
64
66
  modelID: string
67
+ /** Model variant for reasoning effort (e.g. 'low', 'medium', 'high', 'max'). */
68
+ variant?: string
69
+ /** Override the thinking token budget for the selected variant. */
70
+ variantThinkingBudget?: number
65
71
  }
66
72
 
67
73
  // ============================================================================