Skip to content

fix: address PR review feedback on LLM channel config - #642

Closed
ZhuLinsen with Copilot wants to merge 1 commit into
feat/llm-config-usabilityfrom
copilot/sub-pr-641
Closed

fix: address PR review feedback on LLM channel config#642
ZhuLinsen with Copilot wants to merge 1 commit into
feat/llm-config-usabilityfrom
copilot/sub-pr-641

Conversation

Copilot AI commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Four bugs identified in review of the multi-channel LLM config PR, covering false validation errors, incorrect model prefix canonicalization, swallowed error semantics, and a keyboard UX regression.

src/config.py — false positives in validate_structured()

Direct-env LiteLLM providers (groq/*, bedrock/*, etc.) were being flagged as "not in channel model list" for primary, fallback, and vision models. Added _uses_direct_env_provider() guard to all three checks.

api/v1/endpoints/system_config.py — error status on test_llm_channel

All exceptions were returning 500 internal_error, making it impossible for the client to distinguish bad input from a backend fault. ValueError/TypeError now return 422 validation_error; unexpected errors remain 500.

LLMChannelEditor.tsx — double-prefix on alias provider names

normalizeModelForRuntime() would produce openai/vertexai/gemini-pro instead of vertex_ai/gemini-pro for models with alias prefixes not in KNOWN_MODEL_PREFIXES. Added PROTOCOL_ALIASES canonicalization (vertexai→vertex_ai, claude→anthropic, google→gemini, etc.) applied before the prefix lookup:

const PROTOCOL_ALIASES: Record<string, string> = {
  vertexai: 'vertex_ai',
  vertex: 'vertex_ai',
  claude: 'anthropic',
  google: 'gemini',
  openai_compatible: 'openai',
  openai_compat: 'openai',
};
// alias prefix is canonicalized before KNOWN_MODEL_PREFIXES check

LLMChannelEditor.tsx — Space key scrolls page on channel header

onKeyDown was missing e.preventDefault() for Space, causing the page to scroll when keyboard-navigating channel rows. Fixed.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] [#544] Add multi-channel LLM configuration with WebUI editor fix: address PR review feedback on LLM channel config Mar 13, 2026
Copilot AI requested a review from ZhuLinsen March 13, 2026 13:59
@ZhuLinsen ZhuLinsen closed this Mar 13, 2026
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.

2 participants