Skip to content

fix model options#9

Merged
j4ys0n merged 1 commit into
mainfrom
tools-fix
Mar 19, 2026
Merged

fix model options#9
j4ys0n merged 1 commit into
mainfrom
tools-fix

Conversation

@j4ys0n
Copy link
Copy Markdown
Contributor

@j4ys0n j4ys0n commented Mar 19, 2026

No description provided.

@j4ys0n
Copy link
Copy Markdown
Contributor Author

j4ys0n commented Mar 19, 2026

Automated review 🤖

Summary of Changes
Bumps package version from 0.3.1 to 0.3.2 and refactors agent model configuration by introducing a dedicated AgentModelOptionsSchema object to encapsulate temperature and maxTokens. This replaces inline optional fields (temperature, maxTokens) in both AddAgentSchema and UpdateAgentSchema with a single nested modelOptions field, improving schema clarity and extensibility.

Key Changes & Positives

  • Introduces AgentModelOptionsSchema in src/schemas.ts to consolidate model generation options, reducing duplication and improving maintainability 🟢.
  • Aligns AddAgentSchema and UpdateAgentSchema to use consistent modelOptions structure instead of scattered top-level fields, enhancing type safety and documentation clarity 🟢.

Language/Framework Checks

  • z.number().min(0).max(2) for temperature correctly enforces valid range per OpenAI-like APIs in src/schemas.ts.
  • z.number().int().optional() for maxTokens allows -1 for unlimited, matching documented behavior in src/schemas.ts.
  • .optional().describe(...) usage ensures optional fields remain nullable while providing clear Zod descriptions for tooling/intellisense.

Approval Recommendation
Approve

@j4ys0n j4ys0n merged commit 7df5a03 into main Mar 19, 2026
1 check passed
@j4ys0n j4ys0n deleted the tools-fix branch March 19, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant