[codex] Use lightweight context for Foundation#979
Open
mimeding wants to merge 1 commit intoosaurus-ai:mainfrom
Open
[codex] Use lightweight context for Foundation#979mimeding wants to merge 1 commit intoosaurus-ai:mainfrom
mimeding wants to merge 1 commit intoosaurus-ai:mainfrom
Conversation
Contributor
|
@mimeding thank you for the contribution, however, i feel this PR is a bit redundant because user should be able to disable tools and memory per agent configuration. we're not sure how the |
98ce1a8 to
98f8e32
Compare
2 tasks
da59253 to
1a34054
Compare
Contributor
Business rationale: Apple's Foundation model is useful for local, private chat, but its small context window makes the default Osaurus harness too heavy if every baseline tool and memory section is injected up front. This keeps the harness trustworthy by making Foundation chats start light while still allowing explicit on-demand tools when the agent or user needs them. Coding rationale: Reuse the existing ContextSizeResolver from main instead of adding a second Foundation detector. Treat tiny-context models as a baseline-tool trim, not a hard tool ban, so additional session-loaded tools can still be resolved. Keep gated guide text and memory estimates out of tiny prompts, and pin the behavior with SessionPreflightCacheTests while preserving the preview/send disable-info parity tests. Co-authored-by: Codex <codex@openai.com>
1a34054 to
aec5531
Compare
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.
Business rationale
Apple Foundation is the lightest local chat path, but its small context window makes the default Osaurus harness feel unreliable if baseline tool schemas and memory consume the budget before the user's request arrives. This advances the harness pillar by making Foundation chats start lean while still preserving the agent's ability to add tools on demand when the task actually needs them.
Coding rationale
ContextSizeResolverfrom currentmaininstead of carrying a second Foundation-only detector, so context policy remains centralized.capabilities_loadand other explicit session-loaded tools available when requested.What changed
origin/mainand collapsed stale CI/TTS tail commits out of the branch.includeBaselineBuiltInspath through tool resolution and always-loaded-name snapshots.Validation
swift build --package-path Packages/OsaurusCoreswift build --package-path Packages/OsaurusCore -c releaseswift test --package-path Packages/OsaurusCore(1439 tests, 192 suites)xcrun swift-format lint --stricton touched Swift filesswiftlint lint --stricton touched Swift filesgit diff --checkPackages/OsaurusCLI.Non-scope
Residual risks
Fixes #973.