Conversation
- Updated `meta.json` to remove unnecessary pages. - Enhanced `model-fallback-plugin.mdx` with improved installation instructions, usage examples, and configuration details. - Added new sections for best practices and troubleshooting in `model-fallback-plugin.mdx`. - Improved `reflect-and-retry.mdx` with quick start examples and refined configuration options. - Updated `tool-output-filter.mdx` to streamline installation instructions and usage examples, including new configuration options. - Enhanced error handling and performance considerations across plugin documentation. - Modified `BaseLlmFlow` and `PluginManager` to include optional `llmRequest` parameter in callback methods for better context handling.
…l Output Filter plugins - Updated descriptions and key capabilities for clarity and conciseness. - Enhanced installation instructions and quick start sections. - Improved usage examples and configuration details for better understanding. - Added troubleshooting sections with clear issue-fix tables. - Included next steps with related plugin links for user guidance.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request significantly simplifies and restructures the documentation for ADK-TS plugins, introducing clearer quick-start guides and updating examples to favor the AgentBuilder API. It also includes a functional change to the BaseLlmFlow and PluginManager to pass the llmRequest object into the afterModelCallback, enabling plugins to access request context after a model execution. Feedback was provided regarding several code examples in the documentation where LlmAgent instances were missing the required model property, which would result in runtime errors.
Pull Request
Description
Rewrote all 5 plugin documentation pages (index + 4 individual plugin pages) for clarity and accuracy. Pages now lead with what the plugin does and why, show a quick start first, then progressive detail. Fixed multiple type errors in code snippets and removed duplicated content.
Key changes:
filterModelsnippets (requiresBaseLlmviaLLMRegistry.newLLM(), not a string)descriptiononLlmAgentconstructor, wrongtoPlainTextvisibility, missingTrackingScopeimport"plugins"entry frommeta.jsonthat caused a broken nav linkafterModelCallbacknever receivesllmRequest— threaded it throughPluginManagerandBaseLlmFlowRelated Issue
Closes #686
Type of Change
How Has This Been Tested?
pnpm build --filter=@iqai/adk-docs— 384 pages build successfully, no broken linkspnpm test --filter=adk— 538 tests passtsc --noEmit --skipLibCheckChecklist
Additional Notes
Source code changes (bug fix): This PR includes a small fix to
plugin-manager.tsandbase-llm-flow.ts. TheafterModelCallbackhook was never receivingllmRequestdespiteBasePlugindeclaring it as an optional parameter. TheLangfusePlugintries to readparams.llmRequest?.modelfor token tracking but always getsundefined. The fix threadsllmRequestthrough the call chain. This was an incomplete wiring from commit65d79260("fix: wire up remaining plugin callbacks").🤖 Generated with Claude Code