Repository navigation
Failover Models and Gemini Model Support - #86
tylerwince wants to merge 2 commits into
Conversation
🦞 Codex ReviewFindings
Open Questions
Summary Review by Clawd 🦞 via Codex |
|
Thanks Tyler! On it. I don't think Gemini is a good option for this agent, so don't wanna offer it in the onboarding flow, but folks ofc can configure it themselves and the PR is useful. |
| "openai/gpt-4o" | ||
| ], | ||
| allowedModels: [ | ||
| "anthropic/claude-opus-4-5", |
There was a problem hiding this comment.
need to think how this fits together with allowedModels.
|
Happy to spend some more time working on this and/or split out the "FailoverModels" functionality from the Gemini functionality. I think it would be useful to have failover to minimax or something, especially if usage limits get hit for claude subscription. |
|
Models have had a big change in their config and failover works differently now! |
chore: more logging reduction changes
Tasks completed: 2/2 - Port commit #84 (QMD startup hardening + timeout config + test mock refactoring) - Port commits #85 and #86 (forced sync queue + SQLITE_BUSY handling) SUMMARY: .planning/phases/12-memory-qmd-hardening/12-08-SUMMARY.md
…ace (openclaw#86) * feat: add Notion API support for Morpho workspace * fix: address PR review findings * fix: address additional PR review findings * fix: address remaining PR review findings * fix: address final PR review findings * fix: align Notion query handling with review feedback * fix: address additional Notion API review feedback
Code Review: Failover Models & Gemini SupportOverall AssessmentThis PR adds valuable capabilities for production resilience (model failover) and Google Gemini compatibility. Well-structured with good separation of concerns. ✅ Strengths1. Failover Design
2. Google/Gemini Compatibility
3. Code Organization
🔒 Security Considerations1. Failover Loop Risk (Low) // The loop could retry across multiple providers on auth failures
// Consider: Max failover attempts or error categorizationRecommendation: Add opt-out for failover on authentication errors (4xx), as these won't resolve by switching models. 2. Google Schema Sanitization
🛠️ Maintainability1. Error Accumulation const errors: string[] = [];
// Later: throw new Error(`All models failed: ${errors.join("; ")}`);Suggestion: Consider structured error logging or metrics for observability (e.g., which models failed, why). 2. Model Detection Logic const modelApi = model && typeof model === "object" && "api" in model
? (model as { api?: string }).api
: undefined;
const isGoogleModel = modelApi === "google-generative-ai" || provider === "google";Consider: Extract to a named function for reusability and testability. 3. TypeScript Type Safety const toolResult = msg as Extract<AppMessage, { role: "toolResult" }>;Multiple casts in 📊 Performance Implications1. Failover Overhead
2. Schema Sanitization
📋 Best Practices1. Documentation ✅
2. Error Messages throw new Error(`All models failed: ${errors.join("; ")}`);Suggestion: Include guidance (e.g., "Check API keys, quotas, network connectivity"). 3. Channel Types Update channel?: "last" | "whatsapp" | "telegram" | "discord" | "signal" | "imessage";This appears to be an unrelated change - consider splitting into a separate PR for clearer change tracking. 🎯 Recommendations
ConclusionLGTM with minor suggestions. The failover mechanism will significantly improve production reliability, and the Gemini compatibility work enables broader model choice. The code is clean, typed, and well-organized. Would appreciate clarification on whether the channel type changes ( |
…istory, transactions (#35) Adds rain_get_positions, rain_get_position_by_market, rain_get_lp_position, rain_get_portfolio_value, rain_get_pnl, rain_get_trade_history, rain_get_transactions, rain_get_market_transactions to RAIN_TOOLS and matching methods to RainRuntimeClient. Ships with the dashboard endpoints (openclaw-dashboard feat/v2a-slices-3-4-reads). Closes #86/#87 (MCP side). Co-authored-by: Liran Peretz <[email protected]> Co-authored-by: Claude Sonnet 4.6 <[email protected]>
#86 P7-AOC-CONV-PERM-1 · Closeout(Step 5 PASS)分支: bash scripts/group-deployment/aoc-p7-perm1-smoke.shStep 状态
Step 5 验收(10 项)
交付物
明确未做#87 UI、#88 消息、#90/#91 Session、#92/#93 Memory、#95/#96 Run、egress/ACK、影响 #84。 建议
#84 继续独立 observe-only,不混入 P7。 |
Preserve failed session-store results until logical consumption so task authorization reports UNAVAILABLE with the original cause. Keep genuine misses and independent prepared targets intact. Regression proof previously returned an empty task page for an injected SQLITE_IOERR; investigated under CI class #86.
Preserve failed session-store results until logical consumption so task authorization reports UNAVAILABLE with the original cause. Keep genuine misses and independent prepared targets intact. Regression proof previously returned an empty task page for an injected SQLITE_IOERR; investigated under CI class #86.
Preserve failed session-store results until logical consumption so task authorization reports UNAVAILABLE with the original cause. Keep genuine misses and independent prepared targets intact. Regression proof previously returned an empty task page for an injected SQLITE_IOERR; investigated under CI class #86.
) Fix authenticated task lists appearing empty or partial when session metadata reads fail. Preserve typed read results per logical target and let the existing Gateway dispatcher return UNAVAILABLE with the recorded, redacted cause. Genuine empty authorized results and independent healthy targets remain successful. Add regression coverage at the authenticated tasks.list boundary, preserve scalar and prepared-read failures, correct fixtures that relied on suppressed errors, and document the protocol behavior. Investigated under CI class #86; the original hosted log did not establish the particular failing metadata read. Validation: 452 focused tests and changed checks passed in authoring. Exact-head CI run 35354876710 passed on f54beda. Both commits are patch-identical to the scoped-clean Codex review of record and ClawSweeper-reviewed revision, which has no actionable findings.
…claw#151310) Fix authenticated task lists appearing empty or partial when session metadata reads fail. Preserve typed read results per logical target and let the existing Gateway dispatcher return UNAVAILABLE with the recorded, redacted cause. Genuine empty authorized results and independent healthy targets remain successful. Add regression coverage at the authenticated tasks.list boundary, preserve scalar and prepared-read failures, correct fixtures that relied on suppressed errors, and document the protocol behavior. Investigated under CI class openclaw#86; the original hosted log did not establish the particular failing metadata read. Validation: 452 focused tests and changed checks passed in authoring. Exact-head CI run 35354876710 passed on f54beda. Both commits are patch-identical to the scoped-clean Codex review of record and ClawSweeper-reviewed revision, which has no actionable findings.
This adds two related improvements to the embedded agent runtime:
Gemini usage note:
Question for @steipete steipete
Should we add Gemini as an onboarding option and prompt for GEMINI_API_KEY there (similar to Anthropic API key), or keep it as an env‑only setup?