Skip to content

feat: dynamic provider-aware fallback planning and install provider matrix#3

Open
Daltonganger wants to merge 24 commits intomasterfrom
feat/dynamic-provider-fallback-pr3
Open

feat: dynamic provider-aware fallback planning and install provider matrix#3
Daltonganger wants to merge 24 commits intomasterfrom
feat/dynamic-provider-fallback-pr3

Conversation

@Daltonganger
Copy link
Copy Markdown
Owner

Summary

  • sync branch with upstream and include Chutes + OpenCode free model discovery enhancements
  • add strict 6-agent fallback chains with 15s failover behavior
  • add first-run subscription prompts for OpenAI, Anthropic, Copilot, ZAI Plan, Kimi, Antigravity, Chutes, and OpenCode free
  • add dynamic model planning from live catalog to reduce hardcoded model dependence
  • include provider combination matrix documentation for 5 scenarios (2-6 active providers)

Validation

  • bun test src/cli/dynamic-model-selection.test.ts src/cli/providers.test.ts src/cli/opencode-models.test.ts src/cli/config-io.test.ts src/background/background-manager.test.ts src/config/loader.test.ts

Notes

  • this PR is created as a separate fork-side PR for testing iteration

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Feb 7, 2026

Code Review Summary

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 4
Issue Details (click to expand)

CRITICAL

File Line Issue
src/cli/index.ts 67 API keys should not be shown in plain text in help output

SUGGESTION

File Line Issue
src/cli/external-rankings.ts 247 Only add warnings to the warnings array when API key was provided but request failed
src/cli/external-rankings.ts N/A Refactor the getEnv function to a shared utility (already done in src/utils/env.ts)
src/cli/external-rankings.ts N/A Add a check to avoid adding duplicate Chutes models
src/cli/external-rankings.ts N/A Improve error handling to include more detailed error information
Files Reviewed (12 files)
  • src/cli/external-rankings.ts - 4 issues (new file)
  • src/cli/index.ts - 1 issue
  • src/cli/dynamic-model-selection.ts - No issues (significant refactoring)
  • src/cli/install.ts - No issues
  • src/cli/config-manager.ts - No issues
  • src/cli/types.ts - No issues
  • src/cli/providers.ts - No issues
  • src/config/schema.ts - No issues
  • src/config/loader.test.ts - No issues
  • src/utils/env.ts - No issues (new file)
  • src/utils/index.ts - No issues
  • docs/installation.md - No issues
  • package.json - No issues
  • bun.lock - Generated file, skipped

Note: The getEnv refactoring suggestion has already been addressed - the function is now in src/utils/env.ts and properly exported from src/utils/index.ts.

Fix these issues in Kilo Cloud

--aa-key Artificial Analysis API key (optional)
--openrouter-key OpenRouter API key (optional)
--tmux=yes|no Enable tmux integration (yes/no)
--skills=yes|no Install recommended skills (yes/no)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: API keys should not be shown in plain text in documentation examples. Remove the dummy keys from the example command.

);
}
} else {
warnings.push(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Only add warnings to the warnings array when API keys are provided but the request fails. The current implementation adds warnings even when API keys are not set, which could be misleading.

return parsed * 1_000_000;
}

function getEnv(name: string): string | undefined {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Refactor the getEnv function to a shared utility file (like src/utils/index.ts) to avoid code duplication with install.ts.


for (const alias of baseAliases(key)) {
map[alias] = mergeSignal(map[alias], signal);
const chutesAlias = `chutes/${alias}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Add a check to avoid adding duplicate Chutes aliases in fetchOpenRouterSignals, similar to how it's done in fetchArtificialAnalysisSignals.

);

if (!response.ok) {
throw new Error(`Artificial Analysis request failed (${response.status})`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Improve error handling to include more detailed information about the failure, such as the response status text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant