Model input (#6)
Optional `model` input. Defaults move to the mid tiers, `claude-sonnet-5` and `gpt-5.6-terra`, since a run follows a fixed template plus the project's checks; a workflow can still pass a bigger model. Reviewed-on: #6 Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
@@ -20,6 +20,13 @@ const EVENT = env("EVENT_NAME");
|
||||
const AUTHOR_TOKEN = env("GITEA_TOKEN");
|
||||
const REVIEWER_TOKEN = env("REVIEWER_TOKEN");
|
||||
const RULES_PATH = "repos/commons/code-rules/raw/README.md";
|
||||
// The mid tiers: a run follows a fixed template and the project's checks.
|
||||
const DEFAULT_MODELS: Record<string, string> = {
|
||||
claude: "claude-sonnet-5",
|
||||
codex: "gpt-5.6-terra",
|
||||
};
|
||||
const model = (bot: string): string =>
|
||||
Deno.env.get("MODEL") || DEFAULT_MODELS[bot];
|
||||
|
||||
// The reviewer token is withheld so the agent cannot approve as the bot.
|
||||
const { REVIEWER_TOKEN: _, ...agentEnv } = Deno.env.toObject();
|
||||
@@ -134,7 +141,7 @@ async function runClaude(prompt: string): Promise<string> {
|
||||
"--print",
|
||||
"--dangerously-skip-permissions",
|
||||
"--model",
|
||||
"claude-fable-5",
|
||||
model("claude"),
|
||||
"--output-format",
|
||||
"stream-json",
|
||||
"--verbose",
|
||||
@@ -199,7 +206,7 @@ async function runCodex(prompt: string): Promise<string> {
|
||||
args: [
|
||||
"exec",
|
||||
"--model",
|
||||
"gpt-5.5",
|
||||
model("codex"),
|
||||
"--dangerously-bypass-approvals-and-sandbox",
|
||||
"--output-last-message",
|
||||
file,
|
||||
|
||||
Reference in New Issue
Block a user