Skip to content

Fix for API Error 400: "Reasoning is mandatory for this endpoint and cannot be disabled."#1396

Open
bryzgaloff wants to merge 2 commits into
musistudio:mainfrom
bryzgaloff:fix-400-mandatory-thinking-issue1238
Open

Fix for API Error 400: "Reasoning is mandatory for this endpoint and cannot be disabled."#1396
bryzgaloff wants to merge 2 commits into
musistudio:mainfrom
bryzgaloff:fix-400-mandatory-thinking-issue1238

Conversation

@bryzgaloff
Copy link
Copy Markdown

Fix for #1238

>
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
{children as any}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this fix, I got an error running npm run build:

$ tsc -b && vite build
src/components/ui/command.tsx:53:11 - error TS2322: Type 'ReactNode' is not assignable to type '((string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal) & (string | ... 5 more ... | Iterable<...>)) | null | undefined'.
  Type 'bigint' is not assignable to type '((string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal) & (string | ... 5 more ... | Iterable<...>)) | null | undefined'.

53           {children}
             ~~~~~~~~~~

  ../../node_modules/.pnpm/cmdk@1.1.1_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@19.2.14_react-dom_c7cada531f0aaf30a175ae441f7fe8bc/node_modules/cmdk/dist/index.d.ts:5:5
    5     children?: React.ReactNode;
          ~~~~~~~~
    The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & Children & Pick<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<...>> & { ...; } & { ...; }, "key" | ... 1 more ... | keyof HTMLAttributes<...>> & { ...; } & RefAttributes<...>'


Found 1 error.

I could not test the fix without this edit. Please let me know if it has to be removed from the PR.

Comment on lines +191 to +195
if (request.thinking && request.thinking.type === "enabled") {
result.reasoning = {
effort: getThinkLevel(request.thinking.budget_tokens),
// max_tokens: request.thinking.budget_tokens,
enabled: request.thinking.type === "enabled",
enabled: true,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are based on t-j-thomas@d897c9d and work for me.

@bryzgaloff
Copy link
Copy Markdown
Author

bryzgaloff commented May 16, 2026

❤️❤️❤️ If you find this PR useful, I kindly ask for you support: please star https://github.com/bryzgaloff/airflow-clickhouse-plugin and/or subscribe to me at Threads or Medium.

@TonyGeez
Copy link
Copy Markdown
Contributor

❤️❤️❤️ If you find this PR useful, I kindly ask for you support: please star https://github.com/bryzgaloff/airflow-clickhouse-plugin and/or subscribe to me at Threads or Medium.

Yikes.
This is not how it work 🫠

At this point, you can buy Github stars on Fiverr 😂

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.

2 participants