mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-16 01:45:29 +02:00
feat: model taxonomy gains gpt-5.6-sol + per-host generation defaults
Adds 'gpt-5.6-sol' to the model taxonomy with exact-match-only resolution (Terra/Luna/suffixed IDs deliberately fall back to generic gpt) and replaces the hardcoded 'claude' generation default with a validated HostConfig.defaultModel: codex renders the gpt profile when --model is absent, every other host keeps claude. Codex ship golden regenerated accordingly; ADDING_A_HOST documents the new field.
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
* platform-detect, uninstall
|
||||
*/
|
||||
|
||||
import type { Model } from './models';
|
||||
import { validateModel } from './models';
|
||||
|
||||
export interface HostConfig {
|
||||
/** Unique host identifier (e.g., 'opencode'). Must match filename in hosts/. */
|
||||
name: string;
|
||||
@@ -24,6 +27,9 @@ export interface HostConfig {
|
||||
/** Alternative binary names (e.g., ['droid'] for factory). */
|
||||
cliAliases?: string[];
|
||||
|
||||
/** Model overlay used when generation does not receive an explicit --model. */
|
||||
defaultModel: Model;
|
||||
|
||||
// --- Path Configuration ---
|
||||
/** Global install path relative to $HOME (e.g., '.config/opencode/skills/gstack'). */
|
||||
globalRoot: string;
|
||||
@@ -119,6 +125,10 @@ export function validateHostConfig(config: HostConfig, validResolverNames?: Read
|
||||
}
|
||||
}
|
||||
}
|
||||
const modelError = validateModel(config.defaultModel);
|
||||
if (modelError) {
|
||||
errors.push(`defaultModel ${modelError}`);
|
||||
}
|
||||
if (!PATH_REGEX.test(config.globalRoot)) {
|
||||
errors.push(`globalRoot '${config.globalRoot}' contains invalid characters`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user