TUI: make missing API key fallback errors actionable#31585
Closed
liuxiaopai-ai wants to merge 1 commit intoopenclaw:mainfrom
Closed
TUI: make missing API key fallback errors actionable#31585liuxiaopai-ai wants to merge 1 commit intoopenclaw:mainfrom
liuxiaopai-ai wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Contributor
Greptile SummaryImplemented user-friendly error rewriting for missing API key failures, transforming verbose auth-store traces into concise, actionable guidance. The changes add a provider-to-env-var mapping covering 23+ providers (e.g., Key changes:
Code quality:
Confidence Score: 4/5
Last reviewed commit: 9b03f57 |
Contributor
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
Describe the problem and fix in 2–5 bullets:
/modelcan switch to a provider with no configured key, but the follow-up run failure shows a long multi-model fallback trace that is hard to act on.All models failed (...)summaries), with provider-specific key hinting (google->GEMINI_API_KEY) and actionableopenclaw agents add <id>guidance.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
google/*missing-key errors now explicitly point toGEMINI_API_KEY.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
No API key found for provider "google"(including fallback summary shape).runReplyAgent/user-facing sanitize path.Expected
Actual
Missing API key for provider "google". Set GEMINI_API_KEY ... or run openclaw agents add <id> ....Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
All models failed (...)summary containing multiple provider errors; direct missing-key message; OpenAI+Codex OAuth-specific missing-key wording path.Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
9b03f573b.src/agents/pi-embedded-helpers/errors.ts,src/auto-reply/reply/agent-runner-execution.ts.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.No API key found for provider.errorContextpath and kept regex scoped to provider-auth failure phrase.