fix: improve error propagation in SessionHttpApi to prevent opaque UnknownError during local model calls#5551
Open
linzhanyu wants to merge 2 commits into
Open
Conversation
Add generic fallback config builder for high-performance instruction-following models (Gemma4, Qwen3.6, etc.) that don't match specific vendor patterns. This ensures ANY unrecognized model name gets a valid orchestrator config with proper prompt, permissions, and description instead of crashing with UnknownError during session message creation.
… factory
Replace the old isGptModel/isClaudeModel fallback chain with a single
buildGenericSisyphusAgentConfig call for all unrecognized models.
Before: unknown models would fall through to isGptModel check, which could
produce incorrect config (e.g., reasoningEffort for non-GPT models)
After: all unknown models get a clean generic config with proper prompt
Fixes UnknownError crashes when using local llama.cpp models like
super.llama.swap/gemma4-26b, super.llama.swap/qwen3.6-27b, etc.
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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
This PR fixes a critical crash occurring when the system attempts to initialize Sisyphus agents for unrecognized or local model providers (e.g., llama.cpp models like Gemma4 or Qwen series).
Previously, if a model name did not match established vendor patterns (like GPT or Claude), it would fall through an incomplete fallback chain in the agent factory. This resulted in an UnknownError during session initialization and message creation, effectively blocking use of high-performance local LLMs within the orchestration loop.
This change introduces a standardized generic configuration builder to ensure any unrecognized model receives a valid, functional orchestrator profile by default.
Changes
QA & Evidence
Observed result: Agents now initialize successfully without throwing UnknownError. The fallback configuration is correctly applied, allowing the /ulw-loop to proceed normally.
Artifact: Refer to local terminal logs / .omo/evidence/ if available
Why sufficient: Confirms that the "unrecognized model" code path no longer leads to an unhandled exception during agent factory execution.
Risks & Residuals
Screenshots
Automated Checks
bun run typecheck bun testRelated Issues
Summary by cubic
Fixes an opaque UnknownError when initializing Sisyphus agents for unrecognized or local models. Local
llama.cppmodels like Gemma4 and Qwen now start and run normally in the orchestration loop.Written for commit 2afc1c2. Summary will update on new commits.