Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): commit and title generation use your custom model when no text model is set #19386

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/19386/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 4 changed files with 43 additions and 1 deletion (loading 1).

x
0 of 4 viewed, 4 left
38 additions and 0 deletionsapps/server/src/serverSettings.test.tsModified
View file
@@ -813,6 +813,44 @@
}).pipe(Effect.provide(layerServerSettings())),
​
+ // A backend behind a custom model may refuse the built-in default (#12651).
+ it.effect("falls back to the thread default when it is a custom model on that instance", () =>
+ Effect.gen(function* () {
+ const serverSettings = yield* ServerSettingsModule.ServerSettingsService;
+ const claude = ProviderInstanceId.make("claudeAgent");
+ const providerInstances = {
+ [ProviderInstanceId.make("codex")]: {
+ driver: ProviderDriverKind.make("codex"),
+ enabled: false,
+ config: {},
+ },
+ [claude]: {
+ driver: ProviderDriverKind.make("claudeAgent"),
+ config: { customModels: ["z-ai/glm-5.3-flash"] },
+ },
+ };
+​
+ const custom = yield* serverSettings.updateSettings({
+ providerInstances,
+ defaultModelSelection: {
+ instanceId: claude,
+ model: "z-ai/glm-5.3-flash",
+ options: [{ id: "thinking", value: false }],
+ },
+ });
+ assert.deepEqual(custom.textGenerationModelSelection, {