-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(onboard): defer inference configuration for providerless agents #11633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
903aa4a
0427b02
8ed7d6c
14f59f2
49a5643
e44d6f1
41c99ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,7 +96,7 @@ export function prepareManagedRebuildProfileHandoff(input: { | |
| ); | ||
| const upstreamProvider = | ||
| agent === "hermes" && resumeConfig.provider === "hermes-provider" | ||
| ? catalogHandoff.previousProfile.inference.upstreamProvider | ||
| ? (catalogHandoff.previousProfile.inference?.upstreamProvider ?? resumeConfig.provider) | ||
| : resumeConfig.provider; | ||
| const currentOpenClawContextWindow = | ||
| agent === "openclaw" | ||
|
|
@@ -108,8 +108,8 @@ export function prepareManagedRebuildProfileHandoff(input: { | |
| if ( | ||
| agent === "openclaw" && | ||
| currentOpenClawContextWindow === null && | ||
| (catalogHandoff.previousProfile.inference.model !== resumeConfig.model || | ||
| catalogHandoff.previousProfile.inference.upstreamProvider !== resumeConfig.provider) | ||
| (catalogHandoff.previousProfile.inference?.model !== resumeConfig.model || | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Preserve the providerless state through rebuild These null-safe reads are unreachable while inference remains deferred: prepareRebuildResumeConfig rejects any sandbox without both a provider and model before this handoff is built. Consequently, a valid providerless OpenClaw or Hermes sandbox cannot run rebuild—or an auto-upgrade using rebuild—until inference is configured. Accept the complete providerless state and stage inference: null in the replacement profile, with tests for both agents. |
||
| catalogHandoff.previousProfile.inference?.upstreamProvider !== resumeConfig.provider) | ||
| ) { | ||
| throw new Error( | ||
| `Cannot determine a context window for the current OpenClaw target '${resumeConfig.provider}/${resumeConfig.model}'.`, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Construct the complete inference object for providerless profiles.
When
profile.inferenceis null, the spread adds nocompatibilityorinputModalities.validateManagedStartupProfilethen rejects the candidate for both agents. Set OpenClaw defaults tocompatibility: {}andinputModalities: ["text"]; set Hermes defaults tocompatibility: nullandinputModalities: null.🤖 Prompt for AI Agents