[codex] Gate local thinking controls and SQLCipher import#954
Conversation
e404bbf to
30a67dc
Compare
|
Thanks. I checked both overlaps. I agree #956 should own the SQLCipher import guard if it lands first; this PR currently carries an equivalent guard only to keep the capability baseline buildable against current main. After #956 merges, I’ll rebase this branch and drop the duplicate SQLCipher hunks if they are already in main. I also see #953 is already green and should probably merge before the broader capability snapshot work in #955, since #955 touches nearby runtime/model-service paths. |
|
Got it, thanks. I’ll leave #953 out of the immediate sequencing and keep #955 as draft until that branch is ready or main otherwise settles around the model-service changes. For #954/#955, I’ll focus on the #956 overlap first: once the flaky-test and SQLCipher guard changes land, I’ll rebase and remove the duplicate SQLCipher hunks from these branches. |
096e9cc to
58a2c19
Compare
58a2c19 to
2d47d12
Compare
|
@tpae update after rebasing on current |
Summary
This keeps the fallback local thinking toggle hidden unless template inspection confirms both an
enable_thinkingswitch and reasoning markers Osaurus can parse. It also cleans public compatibility wording to describe generic protocol-compatible clients, hardens two environment-sensitive tests, fixes the vendored SQLCipher Swift import on newer macOS SDKs, and aligns CI with the release workflow's pinned Xcode 26.4.1 toolchain.Business Rationale
Users should not see reasoning controls that the selected local model cannot actually honor. Hiding unsupported toggles reduces confusing model behavior and avoids implying that Osaurus can control reasoning for templates that only expose a kwarg without recognizable reasoning output. The SQLCipher import guard and CI toolchain alignment keep the current developer and GitHub test paths able to compile Osaurus after the storage-encryption baseline, which is necessary before broader LLM capability work can be reviewed safely. Generic compatibility wording keeps public docs focused on Osaurus-owned protocol support.
Coding Rationale
LocalReasoningCapabilityalready centralizes template inspection, andModelOptionsalready gates fallback profile selection. AddingisToggleableThinkingpreserves the existing JANG/Gemma/Qwen detection while making the UI profile depend on the combined capability instead of a single kwarg. The SQLCipher change hides only the loadable-extension C API from Swift's Clang import, which Osaurus does not use, while preserving the core SQLite/SQLCipher API and adding vendor guard tests so future SQLCipher bumps keep the import boundary intact. The CI change keeps the test workflow on the same Xcode 26.4.1 pin already used by the release workflow and avoids an unrelated Xcode 26.3EventSourcetransitive module build failure.Expected LLM Performance Impact
Fewer local-model dispatches with misleading thinking controls and fewer degraded first responses from models whose templates mention
enable_thinkingbut do not produce parseable reasoning markers. This should improve model-option accuracy, reduce unsupported reasoning toggles, and make future capability changes easier to validate consistently. The compile and CI fixes do not change model behavior directly, but they keep the capability baseline buildable on current Xcode so follow-up LLM harness improvements can land without test-environment drift.Changes
Test Plan
xcrun swift-format lint --strict Packages/OsaurusCore/Models/Configuration/ModelOptions.swift Packages/OsaurusCore/Services/LocalReasoningCapability.swift Packages/OsaurusCore/Tests/Service/LocalReasoningCapabilityTests.swift Packages/OsaurusCore/Tests/Model/ModelProfileRegistryTests.swift Packages/OsaurusCore/Tests/Sandbox/SandboxManagerCleanupTests.swift Packages/OsaurusCore/Models/API/AnthropicAPI.swift Packages/OsaurusCore/Models/Chat/ChatConfiguration.swift Packages/OsaurusCLI/Sources/OsaurusCLICore/Commands/Bundle/MCPBundleManifest.swift Packages/OsaurusCore/Package.swift Packages/OsaurusCore/Tests/Storage/SQLCipherVendorGuardTests.swiftswift test --package-path Packages/OsaurusCore --filter LocalReasoningCapabilityTestsswift test --package-path Packages/OsaurusCore --filter ModelProfileRegistryTestsswift test --package-path Packages/OsaurusCore --filter SandboxManagerCleanupTestsswift test --package-path Packages/OsaurusCore --filter SQLCipherVendorGuardTestsswift build --package-path Packages/OsaurusCoreswift test --package-path Packages/OsaurusCorexcodebuild build-for-testing -workspace osaurus.xcworkspace -scheme OsaurusCoreTests -disableAutomaticPackageResolution -derivedDataPath build/CIProbeDD -resultBundlePath build/CIProbe2.xcresult -skipPackagePluginValidation -skipMacroValidation -enableCodeCoverage NO COMPILER_INDEX_STORE_ENABLE=NO SWIFT_COMPILATION_MODE=incremental -quietgit diff --checkChecklist
CONTRIBUTING.md