mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-29 19:34:29 +01:00
gstack picks the newest Opus, Fable, Sol and Astra everywhere (GST-3760) (#4811)
gstack now uses the newest model of each family it picks from: the Codex second-model review defaults to `gpt-6.2-astra`, plan-review tiers move to `claude-fable-5-2` and `gpt-6.2-sol`, and eval judges to `claude-fable-5-2`. Why: Garry's rule that gstack always uses the latest Astra, Sol, Fable or Opus; one table now holds each family's newest model, so the next release is a one-line change. Nothing to do: models you pinned in your own config keep working. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/adversarial-native#2 reader=adversarial-native Review-Finding: p1/outside-voice#2 reader=outside-voice Review-Finding: p1/adversarial-native#1 reader=adversarial-native Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/outside-voice#3 reader=outside-voice Review-Finding: p1/adversarial-native#4 reader=adversarial-native Review-Finding: p1/adversarial-native#5 reader=adversarial-native
This commit is contained in:
1 parent
66b8f84376
commit
9a550bca9c
68 files changed
+460
-258
No files matched your search
@@ -132,7 +132,7 @@ function parseGenerationArgs(args: string[]): GenerationOptions {
|
||||
const modelValue = value('--model');
|
||||
const model = modelValue === undefined ? null : resolveModel(modelValue);
|
||||
if (modelValue !== undefined && !model) {
|
||||
throw new Error(`Unknown model: ${modelValue}. Use ${ALL_MODEL_NAMES.join(', ')}, or a family variant (e.g., claude-opus-4-7, gpt-5.4-mini, o3).`);
|
||||
throw new Error(`Unknown model: ${modelValue}. Use ${ALL_MODEL_NAMES.join(', ')}, or a family variant (e.g., claude-opus-5-5, gpt-6.2-astra, o3).`);
|
||||
}
|
||||
const catalogMode = value('--catalog-mode') ?? 'trim';
|
||||
if (catalogMode !== 'trim' && catalogMode !== 'full') {
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"blob":"81904a2a0fdff124713b743253d209f6e394dac8","since":7}
|
||||
{"blob":"6640892961bd6b84d45f25705b452187c1374c9c","since":7,"nonBehavioral":"ARM_JUDGE_MODEL keeps main's value, claude-fable-5-1, now as a literal so the default judge's move to Fable 5.2 can't change it; the unused import is dropped"}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFileSync, writeFileSync, appendFileSync } from 'node:fs';
|
||||
import { collectFreshnessSources, type Fetcher } from '../lib/model-policy-freshness-sources';
|
||||
import { assessFreshness, freshnessCatalogIdentity, renderFreshnessReport, type FreshnessObservation } from '../lib/model-policy-freshness';
|
||||
import { assessFreshness, CATALOG_SOURCE_FILES, freshnessCatalogIdentity, renderFreshnessReport, type FreshnessObservation } from '../lib/model-policy-freshness';
|
||||
import { freshnessGitHub } from '../lib/model-policy-freshness-github';
|
||||
import { publishFreshness, type FreshnessGitHub } from '../lib/model-policy-freshness-publication';
|
||||
|
||||
@@ -10,7 +10,7 @@ export async function runModelPolicyFreshness(options: {
|
||||
const env = options.env ?? process.env;
|
||||
const now = options.now ?? (() => new Date().toISOString());
|
||||
const startedAt = now();
|
||||
const catalog = freshnessCatalogIdentity(readFileSync(new URL('../lib/model-catalog.ts', import.meta.url), 'utf8'));
|
||||
const catalog = freshnessCatalogIdentity(CATALOG_SOURCE_FILES.map(file => readFileSync(new URL(`../${file}`, import.meta.url), 'utf8')));
|
||||
const sources = await collectFreshnessSources(options.fetcher);
|
||||
const observation: FreshnessObservation = {
|
||||
catalog,
|
||||
|
||||
+4
-1
@@ -43,6 +43,9 @@ export type Model = (typeof ALL_MODEL_NAMES)[number];
|
||||
* It is also how to force a model-pinned profile: `--model opus-4-7`,
|
||||
* `--model sonnet-5`, and so on.
|
||||
* 2. Family heuristics for common variants:
|
||||
* - `gpt-6.2-astra` and every other GPT-6 Astra point release or snapshot
|
||||
* → `gpt-6-astra`, the overlay for gstack's default Codex model
|
||||
* (lib/model-families.ts)
|
||||
* - `gpt-5.4-mini`, `gpt-5.4-turbo`, `gpt-5.4-*` → `gpt-5.4`
|
||||
* - `gpt-*` (anything else GPT, including other 5.6 variants) → `gpt`
|
||||
* - `o3`, `o4`, `o4-mini`, `o1`, `o1-mini`, `o1-pro` → `o-series`
|
||||
@@ -79,7 +82,7 @@ export function resolveModel(input: string): Model | null {
|
||||
// not add a Sol family pattern: Terra, Luna, future 5.6 variants, and
|
||||
// suffixed model IDs must NOT inherit Sol's behavioral profile; they fall
|
||||
// through to the generic `gpt` family below.
|
||||
if (/^gpt-6-astra(-|$)/.test(s)) return 'gpt-6-astra';
|
||||
if (/^gpt-6(\.\d+)?-astra(-|$)/.test(s)) return 'gpt-6-astra';
|
||||
if (/^gpt-5\.4(-|$)/.test(s)) return 'gpt-5.4';
|
||||
if (/^gpt(-|$)/.test(s)) return 'gpt';
|
||||
if (/^o[0-9]+(-|$)/.test(s)) return 'o-series';
|
||||
|
||||
@@ -87,7 +87,7 @@ export async function modulesMain(args: string[]): Promise<CliResult> {
|
||||
if (loadout === undefined && modules === undefined) throw new ModuleError('MODULE_SPEC_INVALID', 'render needs --loadout or --modules', 'add --loadout full for the control arm');
|
||||
const modelValue = flag(rest, '--model');
|
||||
const model = modelValue === undefined ? null : resolveModel(modelValue);
|
||||
if (modelValue !== undefined && !model) throw new ModuleError('MODULE_SPEC_INVALID', `--model ${JSON.stringify(modelValue.slice(0, 80))} is not a model gstack knows`, 'pass the same --model setup uses, for example gpt-6-astra');
|
||||
if (modelValue !== undefined && !model) throw new ModuleError('MODULE_SPEC_INVALID', `--model ${JSON.stringify(modelValue.slice(0, 80))} is not a model gstack knows`, 'pass the same --model setup uses, for example gpt-6.2-astra');
|
||||
const planMode = flag(rest, '--plan-mode');
|
||||
if (planMode !== undefined && planMode !== 'on' && planMode !== 'off') throw new ModuleError('MODULE_SPEC_INVALID', '--plan-mode takes on or off', 'drop it, or pass --plan-mode off');
|
||||
const installRoot = flag(rest, '--install-root');
|
||||
|
||||
@@ -6,6 +6,7 @@ import * as path from 'path';
|
||||
import { ALL_MODEL_NAMES, resolveModel, type Model } from './models';
|
||||
import { CODEX_MODEL_REPAIR, codexConfigModel, codexNativeModel, ModelPolicyError, resolvePlanReviewModel, selectionRepair, type ModelSelection } from '../lib/model-policy';
|
||||
import { emitModelPolicyNotice } from '../lib/model-policy-notice';
|
||||
import { newestModel } from '../lib/model-families';
|
||||
|
||||
export interface CodexGenerationModelResolution {
|
||||
model: Model;
|
||||
@@ -13,8 +14,9 @@ export interface CodexGenerationModelResolution {
|
||||
warnings: string[];
|
||||
}
|
||||
|
||||
const CODEX_DEFAULT_MODEL: Model = 'gpt-6-astra';
|
||||
const DEFAULT_SOURCE = `default (${CODEX_DEFAULT_MODEL})`;
|
||||
const CODEX_DEFAULT_ID = newestModel('astra');
|
||||
const CODEX_DEFAULT_MODEL: Model = resolveModel(CODEX_DEFAULT_ID)!;
|
||||
const DEFAULT_SOURCE = `default (${CODEX_DEFAULT_ID})`;
|
||||
|
||||
/**
|
||||
* Strip control characters from strings that originate in the user's
|
||||
@@ -62,7 +64,7 @@ export function resolveCodexGenerationModel(opts: {
|
||||
};
|
||||
|
||||
if (!path.isAbsolute(codexHome)) {
|
||||
return fallback(`Codex home '${sanitize(codexHome)}' is not an absolute path; using Codex default ${CODEX_DEFAULT_MODEL}.`);
|
||||
return fallback(`Codex home '${sanitize(codexHome)}' is not an absolute path; using Codex default ${CODEX_DEFAULT_ID}.`);
|
||||
}
|
||||
|
||||
let raw: string;
|
||||
@@ -71,7 +73,7 @@ export function resolveCodexGenerationModel(opts: {
|
||||
} catch (error) {
|
||||
const code = (error as NodeJS.ErrnoException).code;
|
||||
if (code !== 'ENOENT') {
|
||||
return fallback(`Could not read ${sanitize(configPath)}; using Codex default ${CODEX_DEFAULT_MODEL}.`);
|
||||
return fallback(`Could not read ${sanitize(configPath)}; using Codex default ${CODEX_DEFAULT_ID}.`);
|
||||
}
|
||||
return fallback();
|
||||
}
|
||||
@@ -80,19 +82,19 @@ export function resolveCodexGenerationModel(opts: {
|
||||
try {
|
||||
parsed = Bun.TOML.parse(raw) as Record<string, unknown>;
|
||||
} catch {
|
||||
return fallback(`Could not parse ${sanitize(configPath)}; using Codex default ${CODEX_DEFAULT_MODEL}.`);
|
||||
return fallback(`Could not parse ${sanitize(configPath)}; using Codex default ${CODEX_DEFAULT_ID}.`);
|
||||
}
|
||||
|
||||
if (!Object.prototype.hasOwnProperty.call(parsed, 'model')) {
|
||||
return fallback();
|
||||
}
|
||||
if (typeof parsed.model !== 'string') {
|
||||
return fallback(`Top-level model in ${sanitize(configPath)} is not a string; using Codex default ${CODEX_DEFAULT_MODEL}.`);
|
||||
return fallback(`Top-level model in ${sanitize(configPath)} is not a string; using Codex default ${CODEX_DEFAULT_ID}.`);
|
||||
}
|
||||
|
||||
const model = resolveModel(parsed.model);
|
||||
if (!model) {
|
||||
return fallback(`Unsupported top-level model '${sanitize(parsed.model)}' in ${sanitize(configPath)}; using Codex default ${CODEX_DEFAULT_MODEL}.`);
|
||||
return fallback(`Unsupported top-level model '${sanitize(parsed.model)}' in ${sanitize(configPath)}; using Codex default ${CODEX_DEFAULT_ID}.`);
|
||||
}
|
||||
|
||||
// Sol is exact-only by design (Terra/Luna/dated snapshots must not inherit
|
||||
@@ -146,7 +148,7 @@ export function resolveCodexRuntimeModel(opts: {
|
||||
if (opts.explicit) return chosen('explicit request', opts.explicit);
|
||||
if (env.GSTACK_CODEX_MODEL) return chosen('GSTACK_CODEX_MODEL', env.GSTACK_CODEX_MODEL);
|
||||
const named = codexConfigModel({ ...opts, env });
|
||||
if (named.value === null) return { kind: opts.kind, model: CODEX_DEFAULT_MODEL, source: `gstack default (${named.source})` };
|
||||
if (named.value === null) return { kind: opts.kind, model: CODEX_DEFAULT_ID, source: `gstack default (${named.source})` };
|
||||
return chosen(named.source, named.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ─── Shared Design Constants ────────────────────────────────
|
||||
|
||||
import { DESIGN_SLOP_CATALOG } from '../../lib/design-catalog';
|
||||
import { newestModel } from '../../lib/model-families';
|
||||
|
||||
/**
|
||||
* gstack's AI slop anti-patterns — shared between DESIGN_METHODOLOGY and DESIGN_HARD_RULES.
|
||||
@@ -69,7 +70,7 @@ export const CODEX_WEB_SEARCH_FLAG = `-c 'web_search="cached"'`;
|
||||
* default (#2914). The selection is printed before the first paid call and the
|
||||
* probe checks the same record the flags below pass.
|
||||
*/
|
||||
export const CODEX_FRONTIER_MODEL = 'gpt-6-astra';
|
||||
export const CODEX_FRONTIER_MODEL = newestModel('astra');
|
||||
/**
|
||||
* Nested gstack Codex calls are one-shot reviews: keep installed skills (gstack's
|
||||
* own included) out of the model's context so the reviewer cannot re-run a whole
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
import type { TemplateContext, ResolverFn } from './types';
|
||||
import { getHostConfig } from '../../hosts/index';
|
||||
import { MODEL_FAMILIES } from '../../lib/model-families';
|
||||
import { outsideVoiceFor, outsideVoiceGuard, outsideVoiceInvocation, outsideVoicePreflight, outsideVoiceProvenance, generateOutsideVoiceRouting } from './outside-voice';
|
||||
|
||||
// Domain modules
|
||||
@@ -70,6 +71,11 @@ export const RESOLVERS: Record<string, ResolverFn> = {
|
||||
NATIVE_LABEL: (ctx) => outsideVoiceFor(ctx).nativeLabel,
|
||||
OUTSIDE_PROVIDER: (ctx) => outsideVoiceFor(ctx).id,
|
||||
HOST_ID: (ctx) => ctx.host,
|
||||
NEWEST_MODEL: (_ctx, args) => {
|
||||
const entry = MODEL_FAMILIES.find(f => f.family === args?.[0]);
|
||||
if (!entry) throw new Error(`{{NEWEST_MODEL:<family>}} needs one of ${MODEL_FAMILIES.map(f => f.family).join(', ')}`);
|
||||
return entry.model;
|
||||
},
|
||||
OUTSIDE_PREFLIGHT: (ctx, args) => outsideVoicePreflight(ctx, { disabledBehavior: args?.[0] === 'opt-in' ? 'opt-in' : 'codex-only', ...(args?.[0] === 'autoplan' || args?.[1] === 'plan-review' ? { role: 'plan-review' as const } : {}) }),
|
||||
OUTSIDE_INVOCATION: (ctx, args) => outsideVoiceInvocation(ctx, { timeoutMs: args?.[0] === 'spec' ? 120000 : 540000, gate: args?.[0] === 'spec' ? 'spec' : 'review', reasoningEffort: args?.[0] === 'spec' ? 'medium' : 'high', ...(args?.[0] === 'autoplan' || args?.[0] === 'spec' ? { role: 'plan-review' as const } : {}) }),
|
||||
OUTSIDE_PROVENANCE: (ctx, args) => outsideVoiceProvenance(ctx, args?.[0] ?? ctx.skillName),
|
||||
|
||||
Reference in new issue
Block a user