fix: prevent abort in local inference #7633
Merged
jh-block merged 1 commit intoblock:mainfrom Mar 4, 2026
Merged
Conversation
ca43bd8 to
d198761
Compare
Signed-off-by: Kube Cat <cat@kubecat.io>
d198761 to
d39c9a2
Compare
lifeizhou-ap
added a commit
that referenced
this pull request
Mar 4, 2026
* main: docs: add GOOSE_INPUT_LIMIT environment variable documentation (#7299) Merge platform/builtin extensions (#7630) Clean up stale references to removed components (#7644) fix: scope empty session reuse to current window to prevent session mixing (#7602) fix: prevent abort in local inference (#7633) Revert git patch for llama-cpp-2 (#7642) docs: update recipe usage step to reflect auto-submit behavior (#7639) docs: add guide for customizing the sidebar (#7638) docs: update Claude Code approve behavior and model list in cli-providers guide (#7448) fix: restore provider and extensions for LRU-evicted sessions (#7616) Restore goosed logging (#7622)
craigwalkeruk
pushed a commit
to craigwalkeruk/custom-goose
that referenced
this pull request
Mar 5, 2026
Signed-off-by: Kube Cat <cat@kubecat.io> Co-authored-by: Kube Cat <cat@kubecat.io>
tlongwell-block
added a commit
that referenced
this pull request
Mar 5, 2026
* origin/main: (107 commits) Merge platform/builtin extensions (#7630) Clean up stale references to removed components (#7644) fix: scope empty session reuse to current window to prevent session mixing (#7602) fix: prevent abort in local inference (#7633) Revert git patch for llama-cpp-2 (#7642) docs: update recipe usage step to reflect auto-submit behavior (#7639) docs: add guide for customizing the sidebar (#7638) docs: update Claude Code approve behavior and model list in cli-providers guide (#7448) fix: restore provider and extensions for LRU-evicted sessions (#7616) Restore goosed logging (#7622) feat: return structured {stdout, stderr} from shell tool with output schema (#7604) Improve custom provider creation experience (#7541) fix(scheduler): schedules added via CLI showing up in UI (#7594) chore: openai reasoning model cleanup (#7529) chore(deps): bump hono from 4.12.1 to 4.12.3 in /evals/open-model-gym/mcp-harness (#7585) chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498) chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368) Better network failure error & antrhopic retry (#7595) feat: make the text bar persistent and add a queue for messages (#7560) fix: outdated clippy command in goosehints (#7590) ... # Conflicts: # Cargo.lock # Cargo.toml # crates/goose-server/src/commands/agent.rs # crates/goose-server/src/main.rs # crates/goose-server/src/routes/reply.rs
Abhijay007
pushed a commit
to Abhijay007/goose
that referenced
this pull request
Mar 6, 2026
Signed-off-by: Kube Cat <cat@kubecat.io> Co-authored-by: Kube Cat <cat@kubecat.io>
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.
Fix a bug "Rust cannot catch foreign exceptions" abort that occurs when using Local Inference with models that have long Jinja2 chat templates (e.g. Qwen3 GGUF models).
The problem
apply_chat_template()callsllama_chat_apply_template()which internally does a C++ map.at()lookup on the template string.std::out_of_range.The solution
Switch from
apply_chat_template()toapply_chat_template_with_tools_oaicompat()ininference_emulated_tools.rsWhy?
This function has its own C++ try-catch wrapper. When called with
tools=None, it produces the same prompt. This aligns the emulated tools path with the native tools path, which already uses the oaicompat variant.Testing
A few integration tests were improved, the integration tests for the local inference had been abandoned and marked with
#[ignore], this is problematic because I could not understand very clearly how to actually test my changes. The changes in testing are as follows:local_inference_perf.rsType of Change
AI Assistance
Testing
bartowski/Qwen_Qwen3-32B-GGUF:Q4_K_Mviatest_provider_configuration—previously aborted, now passes.
C++ ABI isn't disturbed by additional native deps).
template strings.
pass (they test downstream of the template step).
Related Issues
/FORCE:MULTIPLEfor duplicatestd::exception_ptrsymbols). This PR addresses the Linux runtime side where the exception links but doesn't propagate correctly across the Rust FFI boundary.CUDAwill crash when context_size is null in registry which falls through to n_ctx_train, despite the fact that estimate_max_context_for_memory should cap it.Screenshots/Demos (for UX changes)
After: Model loads and generates normally.

With

CUDA: