-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(docs): new router #2755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(docs): new router #2755
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile OverviewGreptile SummaryThis PR updates the Router block documentation to reflect the new port-based routing architecture (Router V2). The changes successfully document the key architectural shift from block-based routing to route-based routing with separate output ports. Key ChangesDocumentation Structure Updates:
Visual Update:
Implementation AlignmentThe documentation changes accurately reflect the
Issues FoundModel Name Inconsistencies:
These are documentation-only issues that don't affect functionality, but should be corrected for accuracy and consistency. Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant RouterBlock as Router Block (V2)
participant LLM as AI Model
participant Route1 as Route 1 Port
participant Route2 as Route 2 Port
participant RouteN as Route N Port
participant DownstreamBlock as Downstream Block
User->>RouterBlock: Provide context input
RouterBlock->>RouterBlock: Load route definitions<br/>(title, description, id)
RouterBlock->>LLM: Send context + route descriptions
Note over RouterBlock,LLM: System prompt with all routes<br/>and their descriptions
LLM->>LLM: Analyze context against<br/>route descriptions
LLM->>RouterBlock: Return selected route ID
RouterBlock->>RouterBlock: Validate route selection
alt Route 1 Selected
RouterBlock->>Route1: Output via route-{id} handle
Route1->>DownstreamBlock: Continue workflow
else Route 2 Selected
RouterBlock->>Route2: Output via route-{id} handle
Route2->>DownstreamBlock: Continue workflow
else Route N Selected
RouterBlock->>RouteN: Output via route-{id} handle
RouteN->>DownstreamBlock: Continue workflow
end
RouterBlock->>User: Return outputs:<br/>context, selectedRoute,<br/>selected_path, tokens, cost
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 3 comments
Additional Comments (3)
This inconsistency appears across multiple block documentation files (agent.mdx, evaluator.mdx, guardrails.mdx) and should be addressed for accuracy. The documentation should either:
Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/docs/content/docs/en/blocks/router.mdx
Line: 57:58
Comment:
The model names listed here don't match the actual model IDs in the codebase. Based on `apps/sim/providers/models.ts`:
- "gpt-4.1" does not exist - available OpenAI models include: `gpt-4o`, `gpt-5.2`, `gpt-5.1`, `gpt-5`, `gpt-5-mini`, `o1`, `o3`, `o4-mini`
- "Claude 3.7 Sonnet" - the actual Anthropic model IDs are: `claude-sonnet-4-5` (default), `claude-sonnet-4-0`, `claude-opus-4-5`, `claude-opus-4-1`, `claude-opus-4-0`, `claude-3-7-sonnet-latest`
This inconsistency appears across multiple block documentation files (agent.mdx, evaluator.mdx, guardrails.mdx) and should be addressed for accuracy. The documentation should either:
1. Use the exact model IDs as they appear in the code
2. Or consistently use marketing names if that's the intended approach, but ensure they're accurate
```suggestion
- **OpenAI**: GPT-4o, o1, o3, o4-mini, GPT-5.2, GPT-5.1, GPT-5
- **Anthropic**: Claude Sonnet 4.5, Claude Opus 4.5, Claude Opus 4.1
```
How can I resolve this? If you propose a fix, please make it concise.
Consider adding the Flash variants for more complete documentation: Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/docs/content/docs/en/blocks/router.mdx
Line: 59:59
Comment:
The Google model names are generally correct but could be more comprehensive. Based on `apps/sim/providers/models.ts`, available Gemini models include:
- `gemini-3-pro-preview`
- `gemini-2.5-pro` ✓ (correctly listed)
- `gemini-2.5-flash`
- `gemini-2.5-flash-lite`
- `gemini-2.0-flash` ✓ (correctly listed)
- `gemini-2.0-flash-lite`
Consider adding the Flash variants for more complete documentation:
```suggestion
- **Google**: Gemini 3 Pro Preview, Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.0 Flash
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Consider updating to match the actual model names: Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/docs/content/docs/en/blocks/router.mdx
Line: 63:63
Comment:
The model recommendation references "Claude 3.7 Sonnet" which doesn't match the actual model naming in the codebase. The default model used in the router implementation is `claude-sonnet-4-5` (see `apps/sim/blocks/blocks/router.ts` line 315).
Consider updating to match the actual model names:
```suggestion
Use models with strong reasoning capabilities like GPT-4o or Claude Sonnet 4.5 for best results.
```
How can I resolve this? If you propose a fix, please make it concise. |
Summary
Update router docs to match port based routing.
Type of Change
Testing
Read
Checklist