feat(config): expose full pi-ai model compat fields in config schema#11063
Merged
Takhoffman merged 2 commits intoopenclaw:mainfrom Feb 14, 2026
Merged
feat(config): expose full pi-ai model compat fields in config schema#11063Takhoffman merged 2 commits intoopenclaw:mainfrom
Takhoffman merged 2 commits intoopenclaw:mainfrom
Conversation
afc69ba to
b26849e
Compare
Contributor
|
Merged via squash.
Thanks @ikari-pl! |
steipete
pushed a commit
to azade-c/openclaw
that referenced
this pull request
Feb 14, 2026
…penclaw#11063) thanks @ikari-pl Verified: - pnpm build - pnpm check - pnpm test (full run; transient lobster timeout rerun passed) Co-authored-by: ikari-pl <811702+ikari-pl@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
4 tasks
mverrilli
pushed a commit
to mverrilli/openclaw
that referenced
this pull request
Feb 14, 2026
…penclaw#11063) thanks @ikari-pl Verified: - pnpm build - pnpm check - pnpm test (full run; transient lobster timeout rerun passed) Co-authored-by: ikari-pl <811702+ikari-pl@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
Moufdibrm
pushed a commit
to Moufdibrm/openclaw
that referenced
this pull request
Feb 14, 2026
…penclaw#11063) thanks @ikari-pl Verified: - pnpm build - pnpm check - pnpm test (full run; transient lobster timeout rerun passed) Co-authored-by: ikari-pl <811702+ikari-pl@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
GwonHyeok
pushed a commit
to learners-superpumped/openclaw
that referenced
this pull request
Feb 15, 2026
…penclaw#11063) thanks @ikari-pl Verified: - pnpm build - pnpm check - pnpm test (full run; transient lobster timeout rerun passed) Co-authored-by: ikari-pl <811702+ikari-pl@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…penclaw#11063) thanks @ikari-pl Verified: - pnpm build - pnpm check - pnpm test (full run; transient lobster timeout rerun passed) Co-authored-by: ikari-pl <811702+ikari-pl@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
model.compatfields that pi-ai already supports at runtime but the config schema rejectsModelCompatConfigtype andModelCompatSchemazod validatorProblem
The pi-ai
openai-completionsprovider reads 11 compat fields frommodel.compatviagetCompat(), but OpenClaw's config schema only exposes 4 of them (types.models.ts:9-14,zod-schema.core.ts:13-23). Because the zod schema uses.strict(), any user who sets one of the missing 7 fields inopenclaw.jsongets a validation error on gateway startup.What changed
Added fields:
thinkingFormat"openai" | "zai" | "qwen""qwen"sendsenable_thinking: true(Qwen3/DashScope),"zai"sendsthinking: { type: "enabled" },"openai"sendsreasoning_effort(default).supportsStrictModebooleanstrict: falsein tool definitions. Some endpoints reject unknown fields.supportsUsageInStreamingbooleanstream_options: { include_usage: true }.requiresToolResultNamebooleannamefield (Mistral).requiresAssistantAfterToolResultbooleanrequiresThinkingAsTextbooleanrequiresMistralToolIdsbooleanRelation to open PRs
This is a superset of two open PRs that each add a subset of these fields:
supportsStrictModeonly (1 of 7 missing fields)thinkingFormatplus auto-detection for DashScope URLs (1 of 7 missing fields + auto-detect logic)This PR exposes the complete set of 7 missing fields so the config schema stays in sync with what pi-ai already supports at runtime. Auto-detection (as in #9451) is orthogonal and can be layered on top.
Example config
{ "models": { "providers": { "lmstudio": { "baseUrl": "http://127.0.0.1:1234/v1", "api": "openai-completions", "models": [{ "id": "qwen3-32b", "name": "Qwen3 32B", "reasoning": true, "compat": { "thinkingFormat": "qwen", "supportsStrictMode": false, "supportsDeveloperRole": false } }] } } } }Test plan
pnpm buildpassespnpm test— no existing tests breakthinkingFormat: "qwen"sendsenable_thinking: trueand thinking blocks stream correctlysupportsStrictMode: falseomitsstrictfrom tool definitionsGreptile Overview
Greptile Summary
ModelCompatConfigand its Zod validator to accept additional compat flags already supported by the pi-aiopenai-completionsprovider at runtime..strict()so only the allowlisted compat keys are accepted.Confidence Score: 5/5
.strict()validation; no runtime logic changes were introduced, and the additions keep types and Zod schema in sync.(2/5) Greptile learns from your feedback when you react with thumbs up/down!