Rimossi i provider integrati OpenAI, Bedrock e GCP e ogni fallback a OpenAI (B)
Parte "sicurezza" della fase 3 di aKode (e39aae00), senza le funzioni di imeAI:
- via i provider integrati openai, amazon-bedrock, amazon-bedrock-runtime e gcp
(crate model-provider: moduli amazon_bedrock, gcp, chatgpt_base_url; login Bedrock;
onboarding Bedrock/GCP; richieste app-server di setup cloud);
- nessun URL predefinito verso api.openai.com / chatgpt.com: un provider senza
base_url non viene mai contattato; senza model_provider configurato exec e TUI
mostrano come scriverne uno in config.toml (NO_MODEL_PROVIDER_CONFIGURED_ERROR);
- via la skill openai-docs, la sample skill-installer (scaricava da github.com/openai/skills),
request_plugin_install, AppsInstructions, URL predefiniti di realtime e updater;
- test di sicurezza adattati (provider "mock" al posto di quello integrato), non cancellati.
Restano fuori da questo commit (categoria F/D/E, non portate): chiave per provider nel
portachiavi, modelli da /models, unione dei messaggi di sistema, crate web-tools e
SearXNG, header @@ in apply_patch, modello ausiliario, tool function per apply_patch.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ async fn resume_lists_all_providers_and_fork_keeps_provider_filter() -> Result<(
|
||||
),
|
||||
)?;
|
||||
for (hour, provider, preview) in [
|
||||
("10", "openai", "Client provider history"),
|
||||
("10", "mock", "Client provider history"),
|
||||
("11", "server-provider", "Server provider history"),
|
||||
] {
|
||||
create_fake_rollout(
|
||||
@@ -89,14 +89,14 @@ async fn resume_lists_all_providers_and_fork_keeps_provider_filter() -> Result<(
|
||||
"--remote",
|
||||
remote_endpoint.as_str(),
|
||||
"-c",
|
||||
"model_provider=\"openai\"",
|
||||
"model_provider=\"mock\"",
|
||||
]);
|
||||
}
|
||||
let case = format!("{action}: embedded={embedded}, last={last}, explicit={explicit}");
|
||||
let mut terminal = PtyCodex::start_cli(&cwd, home, &args)?;
|
||||
if action == "resume" && last && explicit {
|
||||
// --last finds the newest thread across providers. An explicit override
|
||||
// cannot switch that thread from server-provider to openai.
|
||||
// cannot switch that thread from server-provider to mock.
|
||||
terminal
|
||||
.wait_for_screen("Cannot change this thread's model provider")
|
||||
.with_context(|| format!("{case}; screen:\n{}", terminal.screen_contents()))?;
|
||||
@@ -158,15 +158,12 @@ async fn selected_gateway_authenticates_before_its_first_chat() -> Result<()> {
|
||||
&profile,
|
||||
format!(
|
||||
r#"
|
||||
model_provider = "openai"
|
||||
model_provider = "office"
|
||||
model = "gpt-5.1"
|
||||
forced_login_method = "api"
|
||||
cli_auth_credentials_store = "file"
|
||||
suppress_unstable_features_warning = true
|
||||
[features]
|
||||
gateway_setup_wizard = true
|
||||
bedrock_setup_wizard = false
|
||||
gcp_setup_wizard = false
|
||||
api_key_model_discovery = false
|
||||
[projects.{trusted}]
|
||||
trust_level = "trusted"
|
||||
@@ -184,23 +181,23 @@ requires_openai_auth = true
|
||||
home,
|
||||
&["--profile", "work", "--no-daemon", "verify the gateway"],
|
||||
)?;
|
||||
// aKode has no default provider, so the gateway is already selected; its sign-in must
|
||||
// finish before the first chat request.
|
||||
terminal
|
||||
.wait_for_screen("Use a custom provider or gateway")
|
||||
.wait_for_screen("Connect an API key to use aKode")
|
||||
.with_context(|| terminal.screen_contents())?;
|
||||
// Startup drains input after its first draw. Retry the navigation until it is accepted.
|
||||
// Startup drains input after its first draw. Retry until the API key entry opens. Pick the
|
||||
// option by number: Enter would arm the activation guard and swallow the save below.
|
||||
let deadline = std::time::Instant::now() + Duration::from_secs(/*secs*/ 30);
|
||||
while !terminal.screen_contains("> 2. Use a custom provider or gateway") {
|
||||
while !terminal.screen_contains("Paste or type your API key") {
|
||||
ensure!(
|
||||
std::time::Instant::now() < deadline,
|
||||
"gateway option was not highlighted: {}",
|
||||
"API key entry did not open: {}",
|
||||
terminal.screen_contents()
|
||||
);
|
||||
terminal.write_input(b"\x1b[B")?;
|
||||
terminal.write_input(b"1")?;
|
||||
terminal.read_output(Duration::from_millis(/*millis*/ 50))?;
|
||||
}
|
||||
terminal.write_input(b"\r")?;
|
||||
terminal.wait_for_screen("Office gateway")?;
|
||||
terminal.write_input(b"\x1b[H\r")?;
|
||||
terminal.wait_for_screen("Paste or type your API key")?;
|
||||
let deadline = std::time::Instant::now() + Duration::from_secs(/*secs*/ 30);
|
||||
while !auth.is_file() && terminal.screen_contains("Paste or type your API key") {
|
||||
|
||||
Reference in New Issue
Block a user