feat(shell): custom providers declared in config.toml join the model catalog
[platforms.<name>] with base_url and api (openai or anthropic) declares a provider. Its key lives in auth.json under the name or in the table; /models is fetched per provider, entries are keyed <name>/<model>, and the key is stamped in memory only.
This commit is contained in:
1 parent
4514b66ffe
commit
2ca1f3baa7
11 files changed
+1048
-23
No files matched your search
@@ -9,7 +9,7 @@ use toml::map::Map as TomlMap;
|
||||
///
|
||||
/// Serializes the read-modify-write in `save_config` so two rapid
|
||||
/// settings toggles can't interleave and clobber each other.
|
||||
static SAVE_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());
|
||||
pub(crate) static SAVE_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());
|
||||
|
||||
pub async fn save_config(config: &Config) -> Result<()> {
|
||||
let _guard = SAVE_LOCK.lock().await;
|
||||
|
||||
Reference in new issue
Block a user