Repository navigation
chore: Upgrade genai-rs from 0.6.0 to 0.7.2 - #267
Merged
Merged
Conversation
Remove LlmRequest abstraction completely and add streaming to agents. ## LlmRequest Removal - Delete gemicro-core/src/llm/request.rs (465 lines removed) - Update LlmClient to accept InteractionBuilder directly - Change TrajectoryStep.request to serde_json::Value for flexibility - Update all agents to use InteractionBuilder pattern - Simplify mock_llm to work with built requests ## Streaming Support - DeepResearchAgent: Stream synthesis phase with synthesis_chunk events - ReactAgent: Stream web_search tool execution with web_search_chunk events - Both use generate_stream_with_cancellation() with deadline checking ## Benefits - ~600 lines removed (net -596 lines) - Direct use of genai-rs types eliminates translation layer - Real-time streaming output for long-running operations - Simpler API surface Closes #255 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The tests need to explicitly specify the model since LlmRequest (which applied defaults) was removed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rate limits from the Gemini API come through as GenaiError which already has is_retryable() and retry_after() methods. The RateLimit variant was never constructed anywhere in the codebase. AgentError::is_retriable() now delegates to LlmError::is_retryable() which handles all transient errors including rate limits from genai-rs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Doc examples were using the old .user_text() API and not specifying a model. Now use: - .with_model(MODEL) - required since LlmRequest removal - .with_text() - current genai-rs API - .build()? - handle the Result properly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename crate directories: gemicro-{X} → gemicro-{X}-agent
- Rename config structs: {X}Config → {X}AgentConfig
- Update all imports and documentation references
- Optimize Makefile: clippy uses --profile test for cache sharing
Agent renames:
- gemicro-prompt → gemicro-prompt-agent, PromptConfig → PromptAgentConfig
- gemicro-developer → gemicro-developer-agent, DeveloperConfig → DeveloperAgentConfig
- gemicro-deep-research → gemicro-deep-research-agent, ResearchConfig → DeepResearchAgentConfig
- gemicro-react → gemicro-react-agent, ReactConfig → ReactAgentConfig
- gemicro-critique → gemicro-critique-agent, CritiqueConfig → CritiqueAgentConfig
- gemicro-echo → gemicro-echo-agent
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix incorrect genai-rs method names in docs (with_* prefix) - Add token count trade-off note to deep-research-agent docs - Fix doctests in deep-research-agent (use simplified error handling) - Add model field to ReactAgentConfig with with_model() builder - Add model field to CritiqueAgentConfig with with_model() builder Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use simplified error handling (.build()?) instead of explicit AgentError mapping which requires importing the type. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use simplified error handling (.build()?) instead of explicit AgentError mapping which requires importing the type. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use simplified error handling (.build()?) instead of explicit AgentError mapping which requires importing the type. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use simplified error handling (.build()?) instead of explicit AgentError mapping which requires importing the type. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adapt to breaking API changes in genai-rs 0.7.x: - function_result_content() → Content::function_result() - InteractionContent → Content - response.text() → response.as_text() - .with_functions() → .add_functions() - .with_turns() → .with_history() - InteractionBuilder typestate removed (no more generic S param) - OwnedFunctionCallInfo.thought_signature field removed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract minimal streaming event types (AgentUpdate, FinalResult, ResultMetadata, EVENT_FINAL_RESULT) into standalone crate with only serde dependencies. This enables external projects like clemini to consume agent streams without pulling in the full gemicro dependency tree (genai-rs, tokio, etc.). - Create gemicro-streaming-events/ with all event types and tests - Update gemicro-core to re-export from new crate - All 847 tests pass Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolved conflicts from main merging: - #255 LlmRequest removal - #259 --model flag - #262 genai-rs 0.7.0 - #263 interaction chaining - #265 audit findings Key resolutions: - Keep genai-rs 0.7.2 (this branch's upgrade) - Use main's registry pattern for CLI - Use main's multi-turn support with previous_interaction_id - Use .add_functions() API (main's pattern) - Remove generic S parameter from stream functions (not in 0.7.2) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryThis PR upgrades genai-rs from 0.6.0 to 0.7.2, adapts all code to breaking API changes in genai-rs 0.7.x, and extracts streaming event types into a new Issues FoundCriticalNone ImportantNone Suggestions
VerdictREQUEST_CHANGES - One minor organizational suggestion for workspace member ordering. Automated review by Claude Code |
Owner
Author
Feedback AddressedSkipped
|
6 tasks
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.
Summary
API Changes Applied
function_result_content()→Content::function_result()InteractionContent→Contentresponse.text()→response.as_text().with_functions()→.add_functions().with_turns()→.with_history()InteractionBuildertypestate removed (no more genericSparam)OwnedFunctionCallInfo.thought_signaturefield removedTest plan
make checkpasses (fmt, clippy, 846 tests)🤖 Generated with Claude Code