Pannello endpoint /endpoint e primo avvio guidato (ripristino da 0.9.2, senza provider predefiniti)
Riportato dalla 0.9.2 solo cio' che serve alla configurazione dei provider: - /endpoint nella TUI: elenco provider, aggiunta/modifica/rimozione, scelta del modello da /v1/models, impostazioni per modello (contesto, temperatura, top_p, max output, ragionamento, nome mostrato), nomi abbreviati dei modelli. - primo avvio guidato quando non c'e' alcun provider: endpoint, chiave, dove salvarla (portachiavi o file protetto), elenco modelli dal server, prova della connessione, salvataggio in config.toml. - chiavi per provider nel portachiavi (`api_key = "keyring"`, `akode login --provider <id> --with-api-key`, `akode logout --provider <id>`). Nessun URL, modello o provider predefinito nel codice; nessun provider cloud tra le scelte (solo endpoint personalizzato e i provider locali Ollama/LM Studio gia' presenti in upstream). Lasciati fuori: passo tema e passo ricerca web (SearXNG) del primo avvio, barra di stato, unione messaggi di sistema, header @@, modello ausiliario, tool function di apply_patch. Test: test CLI debug_models riportato al comportamento upstream (catalogo incluso); snapshot doctor aggiornati al nome e alla versione aKode. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -478,6 +478,13 @@ pub struct ConfigToml {
|
||||
pub experimental_thread_store: Option<ThreadStoreToml>,
|
||||
pub projects: Option<HashMap<String, ProjectConfig>>,
|
||||
|
||||
/// Where per-provider API keys (`api_key = "keyring"`) are stored.
|
||||
/// auto (default): the system keyring if available, otherwise
|
||||
/// `AKODE_HOME/provider_api_keys.json` (owner-only permissions).
|
||||
/// keyring: the system keyring only. file: the file only. ephemeral: memory only.
|
||||
#[serde(default)]
|
||||
pub provider_api_key_store: Option<AuthCredentialsStoreMode>,
|
||||
|
||||
/// Controls the web search tool mode: disabled, cached, indexed, or live.
|
||||
pub web_search: Option<WebSearchMode>,
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ mod tests {
|
||||
experimental_bearer_token: None,
|
||||
auth: None,
|
||||
gateway_oauth: None,
|
||||
api_key: None,
|
||||
wire_api: WireApi::Responses,
|
||||
query_params: None,
|
||||
http_headers: None,
|
||||
@@ -316,7 +317,9 @@ mod tests {
|
||||
supports_websockets: true,
|
||||
supports_standalone_web_search: true,
|
||||
capabilities: None,
|
||||
keyring_account: None,
|
||||
include_internal_metadata: false,
|
||||
models: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@ fn model_provider_from_proto(
|
||||
.map(model_provider_auth_from_proto)
|
||||
.transpose()?,
|
||||
gateway_oauth: None,
|
||||
api_key: None,
|
||||
wire_api,
|
||||
query_params: provider.query_params.map(redacted_string_map),
|
||||
http_headers: provider.http_headers.map(redacted_string_map),
|
||||
@@ -202,6 +203,8 @@ fn model_provider_from_proto(
|
||||
}),
|
||||
// Retired Google Cloud fields (project_id, location, credential_file) are ignored.
|
||||
include_internal_metadata: false,
|
||||
keyring_account: None,
|
||||
models: Default::default(),
|
||||
};
|
||||
Ok((id, info))
|
||||
}
|
||||
@@ -220,6 +223,8 @@ fn model_provider_to_proto(
|
||||
experimental_bearer_token,
|
||||
auth,
|
||||
gateway_oauth: _,
|
||||
api_key: _,
|
||||
keyring_account: _,
|
||||
wire_api,
|
||||
query_params,
|
||||
http_headers,
|
||||
@@ -233,6 +238,7 @@ fn model_provider_to_proto(
|
||||
supports_standalone_web_search,
|
||||
include_internal_metadata: _,
|
||||
capabilities,
|
||||
models: _,
|
||||
} = provider;
|
||||
|
||||
proto::ModelProvider {
|
||||
@@ -613,10 +619,13 @@ mod tests {
|
||||
supports_websockets: true,
|
||||
supports_standalone_web_search: true,
|
||||
gateway_oauth: None,
|
||||
api_key: None,
|
||||
capabilities: Some(ModelProviderCapabilities {
|
||||
cyber_access_programs: Some(true),
|
||||
..Default::default()
|
||||
}),
|
||||
keyring_account: None,
|
||||
models: Default::default(),
|
||||
include_internal_metadata: false,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user