Skip to content

POST /api/ai: non-numeric max sends max_tokens null to Groq #13

Description

@royalpinto007

Problem

max: "abc" flows through Math.max/Math.min to NaN, serialized as max_tokens: null upstream.

Where

app/api/ai/route.ts (outputMax computation, no finite check).

Acceptance

Add a failing route test first asserting numeric max_tokens for max: "abc". Then coerce/validate max.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions