Uh oh!
There was an error while loading. Please reload this page.
Vendor TinyInference and extract inference APIs - #133
Draft
senamakel wants to merge 23 commits into
Draft
Conversation
Adds the tinynference repository as a submodule under vendor/tinyinference to include its inference capabilities as a dependency of the project. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rs,src/harness/cache/types.rs,s Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add the vendored tinynference crate as a dependency to re-export its provider-neutral model, streaming, provider, and embedding APIs through the harness module for source compatibility. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…nference The harness was defining its own `ToolFormat`, `ToolSchema`, `ToolCall`, and `ToolDelta` structs, duplicating the types now provided by the `tinyinference` crate. This change removes the local definitions and replaces them with a single `pub use` re-export, eliminating the maintenance burden of keeping two sets of identical types in sync. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
… and ToolCall Remove the `ToolSchema`, `ToolFormat`, and `ToolCall` implementation blocks from the harness tool module. These types and their associated methods are no longer used within the codebase, so the dead code is being cleaned up to reduce maintenance burden and improve clarity. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `validate_schema_value`, `validate_type_spec`, `json_value_matches_type`, and `json_value_kind` functions were dead code with no remaining callers in the codebase. Removing them eliminates unnecessary compilation overhead and clarifies that the harness tool registry no longer performs inline schema validation. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…onstruction Add a From implementation to convert tinyinference errors into TinyAgentsError, mapping each variant appropriately. Extract the model profile construction from ModelCatalog into a standalone function to make the conversion logic reusable and to prepare for future capability-based profile generation. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The change replaces the previous conversion that wrapped a serialization error into a model error with a direct mapping to a dedicated serialization error variant, preserving the original error type instead of losing it in a generic model error. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The Cargo.lock file is updated to include the new tinyinference package at version 0.2.1 along with its dependencies, which are required for an upcoming feature. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed the import of `Result` and `TinyAgentsError` from the harness tool module, as these types are no longer referenced in the code. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the return type of ChatModel trait implementations across test files from the local Result alias to tinyinference::Result, aligning test code with the upstream crate's error type. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Convert model, tool validation, and scripted model failures into the common harness error type. Propagate accumulator finalization errors instead of treating them as successful results. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update test model implementations to return the error type expected by tinyinference results. This keeps retry, validation, and provider failure scenarios compatible with the current API. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned commit for the tinytinference vendor dependency to include recent changes. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned commit for the tinyinference subproject to incorporate upstream changes. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `tinyagents::Result` import in the live cache test file was no longer referenced by any code in the module, so it has been removed to keep the imports clean and avoid compiler warnings. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned commit for the tinytinference vendor dependency to a newer version, incorporating upstream changes. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…exports The documentation now reflects that the provider-neutral model, message, streaming, usage, caching, and embeddings implementation has moved to the vendored TinyInference crate, with TinyAgents' harness modules becoming compatibility re-exports. The README, spec, and module docs are updated to describe this ownership shift and the new layout under `vendor/tinyinference/`. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…dules/harness/embeddings.md Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformat multi-line async function signatures in test files and a registry file to improve readability by placing each parameter on its own line. This change is purely cosmetic and does not alter any behavior. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The model invocation is now wrapped in an async block that maps any error to a `TinyAgentsError` before being passed to `bridge_block_on`, ensuring consistent error handling across the codebase. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueWarning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
Updated the pinned commit for the tinyinference vendored dependency to incorporate upstream fixes or improvements. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
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 freeto 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.
Summary
tinyhumansai/tinyinferenceas thevendor/tinyinferencegit submoduletinyagents::harness::*import paths with compatibility re-exportsAPI change
Custom
ChatModelimplementations now returntinyinference::Result<ModelResponse>/tinyinference::Result<ModelStream>. TinyAgents converts those failures intoTinyAgentsErrorat runtime boundaries.Dependency
Depends on tinyhumansai/tinyinference#1. Mark this PR ready after that PR lands so the submodule commit is present on TinyInference
mainbefore merge.Validation
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo build --all-targetscargo test(default features, including live OpenAI integration tests)cargo test --all-features(969 unit tests, every integration/live test, and 37 doctests passed)