posit-dev / posit-dev/chatlas

When provider_model is not provided, ChatAuto should look for known environment variables to select a default provider

Open
#266 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
176
Forks
28
Avg merge
18h 42m
Merged PRs (30d)
16

Description

When provider_model is not specified and CHATLAS_CHAT_PROVIDER_MODEL is not set in the environment, ChatAuto always falls back to a default openai value.

I propose it would make more sense to check the environment for "known" variables and try to guess a better fallback: e.g. if OPENAI_API_KEY is defined, default to openai provider; if GOOGLE_API_KEY is defined, default to google provider, etc. If no known variable is detected, fallback to openai.

This would make it easier for an application that uses chatlas (to provide generic chat access, not tied to a particular provider) to be configured automatically based on the environment, w/out requiring an explicit configuration mechanism within the application (and without having to implement its own detection logic, that would later have to be kept in sync with chatlas' supported models).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate ChatAuto's handling of the provider_model fallback and its environment-variable lookup. Review how supported providers expose their known variables, then add coverage showing that a detected provider is selected and that no match still falls back to openai.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.