Releases: yologdev/yoagent
Releases · yologdev/yoagent
v0.7.5
Bug Fixes
- Filter empty text blocks to prevent API errors (#30, closes #29)
- Filter out empty
Content::Textblocks in all 7 providers before sending to APIs - Guard
cache_controlplacement to skip empty text blocks in Anthropic provider - Cache breakpoint scans backwards past empty messages instead of silently dropping
- Guard openai_compat single-text fast path against empty text
- Filter out empty
v0.7.4
Bug Fixes
- Extract HTTP response body from EventSource errors (#27, closes #26)
- Added
classify_eventsource_error()to read response body fromInvalidStatusCodeerrors and classify them properly (context overflow, rate limit, auth, API error) - Added
classify_sse_error_event()for consistent SSE-embedded error classification - Only
Transporterrors are retryable; protocol/parse errors (StreamEnded,InvalidContentType) fail fast - Providers return
Err(ProviderError)enabling retry logic for rate limits and context overflow - Removed spurious
StreamEvent::Errorchannel sends that caused duplicate error events on retry
- Added
v0.7.3
New Features
- MiniMax provider: Add
ModelConfig::minimax()andOpenAiCompat::minimax()for MiniMax AI (MiniMax-Text-01, MiniMax-M1, etc.) with 1M context window support (#23) - Auto-derive ContextConfig: When
context_configis not explicitly set, compaction budget is automatically derived fromModelConfig.context_window(80% for context, 20% reserved for output) (#25)ContextConfig::from_context_window()available for manual usewithout_context_management()correctly takes precedence over auto-derivation
Documentation
- Updated provider docs with MiniMax and Z.ai support
- Added all
ModelConfigconvenience constructors to provider overview - Documented context auto-derivation behavior and priority chain
v0.7.2
v0.7.1
v0.7.0
Breaking changes
AgentLoopConfigno longer has a lifetime parameter;providerfield is nowArc<dyn StreamProvider>Agent::reset()is nowasync
New features
prompt(),prompt_messages(), andcontinue_loop()now spawn the agent loop concurrently, returning the event receiver immediately for true real-time streaming- New
Agent::finish()method to await a pending loop and restore state
Fixes
_with_sendervariants now callfinish()first to prevent state loss from prior runs- Updated all documentation to reflect API changes
v0.6.1
What's New
- Real-time event streaming — New
prompt_with_sender(),prompt_messages_with_sender(), andcontinue_loop_with_sender()methods accept a caller-providedmpsc::UnboundedSender<AgentEvent>for consuming events in real-time on a separate task. Zero breaking changes — existing API works as before.
Usage
let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel();
tokio::spawn(async move {
while let Some(event) = rx.recv().await { /* real-time! */ }
});
agent.prompt_with_sender("hello", tx).await;
// state restored automatically, no finish() neededCloses #13
v0.6.0
What's New
- OpenAPI Tool Adapter — Auto-generate
AgentToolimplementations from OpenAPI 3.0 specs. Point an agent at any API spec (GitHub, Stripe, etc.) and it instantly gets callable tools for every operation. Gated behind theopenapiCargo feature.
Usage
let agent = Agent::new(AnthropicProvider)
.with_openapi_file("petstore.yaml", OpenApiConfig::default(), OperationFilter::All)
.await?
.with_system_prompt("You are an API assistant.")
.with_model("claude-sonnet-4-20250514")
.with_api_key(api_key);See the OpenAPI guide for full documentation.
v0.5.3
What's New
- Local provider support: Wire
ModelConfigthrough the agent loop, enabling local OpenAI-compatible servers (LM Studio, Ollama, llama.cpp, vLLM, LocalAI) via the high-levelAgentAPI ModelConfig::local()constructor: Convenience method for local servers — no API key requiredAgent::with_model_config(): New builder method to set model configuration (base URL, headers, compat flags)--api-urlCLI flag: Run the CLI example against any local server:cargo run --example cli -- --api-url http://localhost:1234/v1 --model my-model
Migration
If you construct AgentLoopConfig directly (low-level API), add model_config: None to the struct literal. The high-level Agent API requires no changes.
v0.5.2
CLI Example Improvements
- Fix UTF-8 panic:
truncate()used byte slicing which panicked on multi-byte characters (emoji, CJK). Now useschar_indices()for safe truncation. - Display errors: API failures, rate limits, and network errors were silently swallowed. Now shown in red via
StopReason::Errorhandling. - Smarter
/clear: Usesclear_messages()instead of rebuilding the entire Agent, preserving runtime configuration. - Ctrl+C handling: Graceful exit with goodbye message instead of raw
^Coutput. - Accurate line count: Updated doc comment and README to reflect actual file length (~250 lines).