Skip to content

feat: Configurable model usage with runtime AI provider selection#403

Draft
Copilot wants to merge 1 commit intodynemic-modelfrom
copilot/sub-pr-386
Draft

feat: Configurable model usage with runtime AI provider selection#403
Copilot wants to merge 1 commit intodynemic-modelfrom
copilot/sub-pr-386

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Adds runtime AI provider configuration, allowing users to override environment defaults with custom API keys and model selections through the settings UI. Configuration is memory-only (not persisted) and supports OpenAI, Google Gemini, and Anthropic.

Changes

Frontend

  • Settings context manages AI vendor, API key, and model name state
  • Settings modal UI with real-time API key validation
  • Validation feedback for incompatible vendor/model combinations

Backend

  • /api/validate-key endpoint validates credentials across providers
  • All LiteLLM agent calls accept optional custom_api_key and custom_model parameters
  • Pydantic models updated: ChatRequest, ConfirmRequest include optional custom fields

Configuration

  • AI_VENDORS mapping defines supported providers and example models
  • Custom settings passed directly to LiteLLM via extra_body parameter
  • Falls back to environment configuration when custom settings absent
# Example agent usage with custom configuration
response = await analysis_agent(
    question="SELECT * FROM users",
    graph_schema=schema,
    custom_api_key="sk-...",
    custom_model="gpt-4"
)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add configurable AI model usage to QueryWeaver feat: Configurable model usage with runtime AI provider selection Feb 16, 2026
Copilot AI requested a review from galshubeli February 16, 2026 14:43
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