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:
@@ -6,7 +6,6 @@ import { createRequire } from "node:module";
|
||||
|
||||
import type { CodexConfigObject, CodexConfigValue } from "./codexOptions";
|
||||
import { SandboxMode, ModelReasoningEffort, ApprovalMode, WebSearchMode } from "./threadOptions";
|
||||
import type { CyberAccessProgram } from "./turnOptions";
|
||||
|
||||
export type CodexExecArgs = {
|
||||
input: string;
|
||||
@@ -29,8 +28,6 @@ export type CodexExecArgs = {
|
||||
skipGitRepoCheck?: boolean;
|
||||
// --output-schema
|
||||
outputSchemaFile?: string;
|
||||
// --cyber-access-program
|
||||
cyberAccessProgram?: CyberAccessProgram;
|
||||
// --config model_reasoning_effort
|
||||
modelReasoningEffort?: ModelReasoningEffort;
|
||||
// AbortSignal to cancel the execution
|
||||
@@ -143,9 +140,6 @@ export class CodexExec {
|
||||
commandArgs.push("--output-schema", args.outputSchemaFile);
|
||||
}
|
||||
|
||||
if (args.cyberAccessProgram !== undefined) {
|
||||
commandArgs.push("--cyber-access-program", args.cyberAccessProgram);
|
||||
}
|
||||
|
||||
if (args.modelReasoningEffort) {
|
||||
commandArgs.push("--config", `model_reasoning_effort="${args.modelReasoningEffort}"`);
|
||||
|
||||
@@ -37,4 +37,4 @@ export type {
|
||||
ModelReasoningEffort,
|
||||
WebSearchMode,
|
||||
} from "./threadOptions";
|
||||
export type { CyberAccessProgram, TurnOptions } from "./turnOptions";
|
||||
export type { TurnOptions } from "./turnOptions";
|
||||
|
||||
@@ -86,7 +86,6 @@ export class Thread {
|
||||
workingDirectory: options?.workingDirectory,
|
||||
skipGitRepoCheck: options?.skipGitRepoCheck,
|
||||
outputSchemaFile: schemaPath,
|
||||
cyberAccessProgram: turnOptions.cyberAccessProgram,
|
||||
modelReasoningEffort: options?.modelReasoningEffort,
|
||||
signal: turnOptions.signal,
|
||||
networkAccessEnabled: options?.networkAccessEnabled,
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
export type CyberAccessProgram = "standard" | "daybreak_blue" | "daybreak_red";
|
||||
|
||||
export type TurnOptions = {
|
||||
/**
|
||||
* Experimental Cyber selection for this turn with the built-in OpenAI provider.
|
||||
* Omit to use server defaults.
|
||||
*/
|
||||
cyberAccessProgram?: CyberAccessProgram;
|
||||
/** JSON schema describing the expected agent output. */
|
||||
outputSchema?: unknown;
|
||||
/** AbortSignal to cancel the turn. */
|
||||
|
||||
@@ -229,48 +229,6 @@ describe("Codex", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("passes cyber access program selections only to the turns that specify them", async () => {
|
||||
const { url, close } = await startResponsesTestProxy({
|
||||
responseBodies: [
|
||||
sse(responseCompleted("response_1")),
|
||||
sse(responseCompleted("response_2")),
|
||||
sse(responseCompleted("response_3")),
|
||||
sse(responseCompleted("response_4")),
|
||||
],
|
||||
});
|
||||
const { args: spawnArgs, restore } = codexExecSpy();
|
||||
const { client, cleanup } = createMockClient(url);
|
||||
|
||||
try {
|
||||
const thread = client.startThread();
|
||||
await thread.run("select blue", { cyberAccessProgram: "daybreak_blue" });
|
||||
const threadId = thread.id;
|
||||
expect(threadId).toEqual(expect.any(String));
|
||||
|
||||
const streamed = await thread.runStreamed("select red", {
|
||||
cyberAccessProgram: "daybreak_red",
|
||||
});
|
||||
for await (const _ of streamed.events) {
|
||||
// Consume the streamed turn before resuming the thread.
|
||||
}
|
||||
await thread.run("select standard", { cyberAccessProgram: "standard" });
|
||||
await thread.run("use automatic selection");
|
||||
|
||||
expect(spawnArgs).toHaveLength(4);
|
||||
expectPair(spawnArgs[0], ["--cyber-access-program", "daybreak_blue"]);
|
||||
expectPair(spawnArgs[1], ["--cyber-access-program", "daybreak_red"]);
|
||||
expectPair(spawnArgs[2], ["--cyber-access-program", "standard"]);
|
||||
expect(spawnArgs[3]).not.toContain("--cyber-access-program");
|
||||
for (const args of spawnArgs.slice(1)) {
|
||||
expectPair(args, ["resume", threadId!]);
|
||||
}
|
||||
} finally {
|
||||
cleanup();
|
||||
restore();
|
||||
await close();
|
||||
}
|
||||
}, 15_000);
|
||||
|
||||
it.each(["high", "persistent"] as const)(
|
||||
"passes %s modelReasoningEffort to exec",
|
||||
async (effort) => {
|
||||
|
||||
Reference in New Issue
Block a user