Repository navigation
refactor(inference): delegate context window resolution - #555
Merged
senamakel merged 86 commits intoOct 21, 2026
Merged
Conversation
The maximum executable size for tinymold was increased from 256M to 2G to accommodate larger test executables without filling the scratch disk. This change allows for storing executables instead of recompiling the core test harness on every run. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adjusted the logic in the pruning script to correctly reflect that removing executables stored by Tinymold does not free disk space if they share inodes with the store. This clarifies when space is actually freed during the coverage cleanup process. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the documentation to reflect that the scratch disk size is 320 GB instead of 160 GB, and adjusted related CI scripts to use this new capacity information. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…/self-hosted/lanes.mjs Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
This test case was updated to more accurately reflect how the private runner handles lane execution, specifically ensuring that independent lanes run sequentially while allowing light lanes to overlap with cargo lanes. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
This change refactors how lanes are scheduled in the self-hosted runner, specifically for the ex63 profile. It simplifies the logic to ensure private lanes run sequentially, even when parallelism is requested, which aligns with observed performance constraints on the target environment. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…s/openhuman-core/src/memory/sch Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updates the expected package names in the dependency simulation script to reflect changes in tinymemory 2.0.0. This adjustment is synchronized with the updated dependency limits documented in kernel-floor.limits. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
This updates the expected flow entry in the calibration script to reflect recent changes in the kernel floor limits. This ensures the CI check remains accurate against the current codebase structure. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The allowed values for the source kind and target fields have been simplified to remove references to Composio, aligning with current supported integrations. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Refines the documentation for `MemorySourceKind` in `SourceView` and `SourcesAddParams` to remove mention of the Composio toolkit. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
This change introduces logic to defer the import resume if a peer run is currently holding the workspace. This prevents the contention from being recorded as a failed resume when a layout migration or conversation backfill is occurring. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The logic for checking the TinyHumans engine key has been updated to use the session support credential resolution instead of a direct check against the engine's status. This ensures that the key presence check aligns with the current credential resolution mechanism. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The logic for quarantining invalid legacy files is updated to use `once_per_backend`. This prevents redundant parsing and validation attempts for the same legacy file across multiple calls to the storage backend. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adjusted the expected byte count and SHA-256 digest in the health test to reflect recent changes in the memory schema methods. This ensures the test remains accurate against the current implementation. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updates the subproject commit hash for tinychannels to reflect the latest version. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
This updates the version of the tinychannels dependency and its associated platform assets to 0.1.38 across all supported platforms. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
This updates several dependencies across the project, primarily bumping the version of `windows-sys` to 0.61.2 to align with newer platform requirements. It also updates `getrandom` and several `tinychannels` packages. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
This updates the line numbers and file paths within the CI baseline JSON files to reflect recent code changes across various modules. This ensures that the automated checks remain accurate against the current codebase structure. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
This change adds an exemption for `check-module-boundaries.mjs` in the CI file filtering logic. This is because this script only audits the dependency graph and does not involve building or running any linked modules. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The list of paths checked by the gated test allowlist has been updated to reflect recent changes in the codebase. This ensures that the CI checks remain relevant to the current project structure. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test module for bus host is now conditionally compiled only when both testing and the modules feature are enabled. Additionally, CI scripts and kernel floor limits are updated to reflect a change in the flows profile measurement. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updates the description in the kernel-floor script to clarify that the flow profile improvement is based on merging upstream main, and no new dependency was added. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds unit tests to cover various scenarios within the registry module to ensure its correctness and robustness. This helps validate the expected behavior of the registry functionality. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test case for flows recording the schedule object has been updated to assert against contract version 7 instead of version 6 to reflect current API expectations. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly
The context window resolution logic has been significantly refactored to centralize route construction and separate concerns between synchronous projection and asynchronous resolution. This change moves the responsibility of route input construction into `route_input` and introduces helper functions for static facts and client building, improving modularity. Auto-committed-on: dragonfly
This refactoring centralizes and simplifies how context window sizes are projected across model and route contexts. It updates `model_context` to rely more heavily on the new projection functions in `context_window`, and adjusts routing logic in `context_window.rs` to handle provider discovery more cleanly. Auto-committed-on: dragonfly
Adds a new test case to verify that the model limits client correctly uses the provider CA and falls back to the proxy when necessary. This ensures robust connection handling across different service configurations. Auto-committed-on: dragonfly
Refines the documentation for context windows to clarify how the context window drives trimming and compaction. It details the sequence of information provided to the route resolver and clarifies the different sources for context window limits. Auto-committed-on: dragonfly
Updates tests in provider_model_tests.rs to use the constant for the openhuman provider instead of a hardcoded string literal. This improves test robustness and consistency. Auto-committed-on: dragonfly
Introduces an `OfflineFetcher` struct and implements `ModelListingFetcher` for use in unit tests. This allows context window resolution to proceed in tests without making actual network calls to discover model limits. Auto-committed-on: dragonfly
This change refactors the context window routing logic to simplify conditional checks and improve code structure. It also updates related tests to reflect the changes in the implementation. Auto-committed-on: dragonfly
This change removes a helper function for retrieving a remembered context window and adjusts how context window projection handles optional extensions. This streamlines the internal logic for determining model context windows. Auto-committed-on: dragonfly
This refactors the context window retrieval in `model_context` to exclusively use the project context window function, removing deprecated static helper functions. This ensures consistency in how context window sizes are determined across the inference module. Auto-committed-on: dragonfly
This change updates how context windows are determined for provider models by introducing a dedicated provider model context window lookup. This allows for more granular control over context window settings based on specific provider model metadata. Auto-committed-on: dragonfly
Adds a test case to verify that an explicit empty context does not borrow the ambient provider registration when projecting a context window for a model. Auto-committed-on: dragonfly
This change refactors the context window resolution to use explicit block scoping for the non-test path. This improves readability by clearly delineating the asynchronous call chain for production code. Auto-committed-on: dragonfly
This updates the subproject commit hash for tinyagents to the latest version. This ensures the dependency is using the most recent code. Auto-committed-on: dragonfly
The logic for projecting a static model-only context window has been updated to explicitly use `ContextWindowResolver::new()` instead of calling `resolver()`. This change clarifies that the model-only projection does not borrow state from the managed inference provider route. Auto-committed-on: dragonfly
This change updates the initialization of the context window resolver in tests to use a function call instead of a direct constructor call. This aligns with recent changes in the library's API. Auto-committed-on: dragonfly
This change updates context window routing to correctly handle empty or whitespace-only model strings by returning a default input instead of attempting to process them. Tests are also updated to verify this new behavior. Auto-committed-on: dragonfly
This updates the subproject commit hash for tinyagents to the latest version. This ensures the dependency is using the most recent code. Auto-committed-on: dragonfly
Introduces a helper function to map the local provider kind enum to the corresponding enum used by tinyinference providers. This ensures type compatibility when resolving context windows across different internal modules. Auto-committed-on: dragonfly
This change refactors the context window resolution logic to use the result of `route_local_kind` directly in the resolver call. This cleans up the call site by removing an unnecessary intermediate step. Auto-committed-on: dragonfly
This change updates the import path for `ContextWindowRouteInput` in context window tests and adds `models: None` to a readiness probe configuration. This ensures tests correctly reflect the current API structure and testing setup. Auto-committed-on: dragonfly
The setup for `cached_probe_serves_definitive_negative_results` was simplified by removing the direct registration of a managed provider. This test now uses a scoped host registration to supply a deterministic negative probe, which cleans up the test logic while maintaining its original behavior. Auto-committed-on: dragonfly
This updates the dependency version for tinychannels-bus to 0.1.38 to incorporate recent bug fixes and improvements. Auto-committed-on: dragonfly
The context window projection now uses a fresh native resolver instead of relying on borrowed provider discovery from a route. This change improves isolation when determining the context window for a model. Auto-committed-on: dragonfly
This was referenced Oct 21, 2026
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.
OpenHuman now delegates context-window resolution and remembered-route projection to TinyInference. The host adapter supplies its config override and CA/proxy-aware client factory, while keeping route registration, provider-specific hints, tier aliases, and the TinyHumans managed default as owner-supplied facts. Model-only projections use a fresh native resolver so remembered state from a valid empty-provider route cannot leak into static lookups. Vision and user model-registry behavior remain host-owned.
Regression coverage exercises public discovery-to-projection behavior, empty-provider isolation, explicit versus ambient model configuration, blank model handling, provider hints and managed defaults, local routes, and readiness cache behavior.
Validation on the final pinned worktree:
--no-default-features --no-fail-fast), including the new projection isolation test and readiness cache regression.pnpm rust:layout,cargo fmt --check, and whole-branchgit diff --check.One broader JSON-RPC sweep remains unresolved: an incorrectly ordered runner invocation bypassed the intended single-test filter and ran the whole integration binary; 101 passed, 1 failed, and 7 were ignored. The failure was
json_rpc_cron_manual_worker_survives_caller_cancel_on_published_tinyflows, which received a successful queue acknowledgement where the test expected cancellation. No baseline comparison was made, so this is not claimed as pre-existing. The focused context-window JSON-RPC tests passed.Refs #262
Part of tinyhumansai#8092