Skip to content
Source
Sign inSign up
TanStack/schemas

Cloudflare AI Gateway: read a model's own Reasoning Effort levels (#323 item 1) #431

Mergedtombeckenhammerged 2 commits intomain fromfix/323-cloudflare-adaptivemerged by tombeckenham View on GitHub

Showing 2 changed files with 85 additions and 0 deletions.

x
0 of 2 viewed, 2 left
43 additions and 0 deletionssrc/server/providers/adapters/cloudflare-ai-gateway.test.tsModified
View file
@@ -297,6 +297,49 @@
expect(grok46.capabilities).toEqual(['tools', 'reasoning'])
​
+ it("reads levels from the model's own Reasoning Effort metadata over a generic field", () => {
+ // Shape of catalog-models/meta-muse-spark-open.json (2026-10-22).
+ const parsed = parseCatalogModel(
+ {
+ ...FABLE,
+ model_id: 'meta/muse-spark-open',
+ metadata: { 'Reasoning Effort': 'low, medium, high, xhigh (default)' },
+ schema: {
+ input: {
+ properties: {
+ max_tokens: {},
+ reasoning_effort: {
+ description:
+ 'Optional reasoning control; availability and accepted values are model-dependent.',
+ type: ['string', 'null'],
+ },
+ },
+ },
+ },
+ },
+ SOURCE,
+ { schemaShared: true },