chore: drop the dead max_tokens from every bundle; restore minimal-delegate's 64k - #388
Merged
Merged
Conversation
context-simple's `max_tokens` used to be a fallback consulted only when a provider published no context window. Orchestrators always pass a provider, so these values never reached the wire -- they were inert in every bundle here. It is now a CAP, defaulting to None (no cap). Leaving these lines in place would silently clamp every session to 300,000 tokens -- including sessions on 1M-context models -- turning a documentation fix into a 3x behavior change nobody asked for. Deleting them preserves today's behavior exactly, and leaves no fossil that looks meaningful. Files, all `session.context.config.max_tokens`: bundle.md 300000 bundles/anchors/bundle.md 300000 experiments/delegation-only/bundle.md 300000 experiments/exp-foundation.md 300000 experiments/exp-lean/behaviors/lean-foundation.yaml 300000 experiments/minimal-delegate/.../minimal-delegate-foundation.yaml 64000 anchors-amp-dev, amplifier-dev, minimal, with-anthropic and with-openai set no max_tokens of their own -- they inherit, so the root bundle.md covers them. WORTH A DECISION, deliberately not made here: minimal-delegate asked for 64,000, a tight budget matching the experiment's intent, and never got it. That intent is now expressible for the first time. Restoring it is a behavior change on an experiment, so it should be chosen, not inherited from a line that never worked. Every touched file re-parsed after the edit to prove the YAML still loads and only the intended key is gone. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
…applies This experiment asked for `max_tokens: 64000` -- a deliberately tight budget, the whole point of a delegate-only head -- and never got it: `max_tokens` was a fallback consulted only when a provider published no window, and the orchestrator always passes one. The previous commit deleted the line to preserve behavior. Restoring it now is a deliberate choice, not an inherited one: the cap works, nobody depends on this bundle today, and the 64k constraint is finally measurable. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Collaborator
Author
The five PRs in this coordinated changeMerge FIRST — independent of each other, any order:
Merge AFTER those three: The two config repos (4, 5) delete |
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.
What changed — two commits
1.
chore: drop the dead max_tokens from every bundlecontext-simple's
max_tokensused to be a fallback consulted only when a provider published no context window. Orchestrators always pass a provider, so these values never reached the wire — they were inert in every bundle here.It is now a CAP defaulting to
None(no cap). Leaving these lines in place would silently clamp every session to 300,000 tokens — including sessions on 1M-context models — turning a documentation fix into a 3x behavior change nobody asked for. Deleting them preserves today's behavior exactly, and leaves no fossil that looks meaningful.Files, all
session.context.config.max_tokens:bundle.mdbundles/anchors/bundle.mdexperiments/delegation-only/bundle.mdexperiments/exp-foundation.mdexperiments/exp-lean/behaviors/lean-foundation.yamlexperiments/minimal-delegate/.../minimal-delegate-foundation.yamlanchors-amp-dev,amplifier-dev,minimal,with-anthropicandwith-openaiset nomax_tokensof their own — they inherit, so the rootbundle.mdcovers them.2.
feat(minimal-delegate): restore the 64k budget, now that it actually appliesThat experiment asked for
max_tokens: 64000— a deliberately tight budget, the whole point of a delegate-only head — and never got it. The previous commit deleted the line to preserve behavior; restoring it is a deliberate choice, not an inherited one: the cap works, nobody depends on this bundle today, and the 64k constraint is finally measurable.How to verify
Every touched file was re-parsed after the edit to prove the YAML still loads and only the intended key is gone.
1 pre-existing failure, verified failing on
mainbefore this change:test_grpc_adapter_main.py::TestVerifyModuleType::test_non_isinstance_object_with_mount_passes.Breaking changes
Behavior is preserved exactly for every bundle except
minimal-delegate, which now genuinely runs under a 64,000-token cap — an intentional, opted-in change to an experiment with no current dependents.Coordinated five-repo change
max_tokensincontext-simplewas documented as "Maximum context size" but implemented as a fallback consulted only when a provider published no context window. Orchestrators always pass a provider, so the knob was silently dead in production. It is now a real cap (defaultNone= no cap); a newmax_tokens_fallback(default 200,000) took over the fallback role.Merge order matters
Merge FIRST (independent of each other, any order):
amplifier-module-context-simple—feat/max-tokens-capamplifier-module-provider-gemini—feat/publish-context-windowamplifier-app-cli—feat/session-module-config-overridesMerge AFTER those three:
4.
amplifier-foundation—chore/drop-dead-max-tokens5.
amplifier-bundle-attractor—chore/drop-dead-max-tokensRationale: the two config repos delete
max_tokenslines that only become safe-to-delete once context-simple's new semantics are in.Cross-repo verification
DTU instance
context-overflow-fix-20260915, all 8 target behaviors PASS:max_tokens: 500000caps to exactly 500,000.settings.yamloverrides.context-simple.confignow reachessession.contextthrough the CLI's ownresolve_bundle_config.test_image_vision_integration_with_real_api, needs a liveGOOGLE_API_KEY, fails onmaintoo)test_grpc_adapter_main.py::TestVerifyModuleType::test_non_isinstance_object_with_mount_passes, verified failing onmainbefore the change)