Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(coderd/x/chatd): use enabled model lookups
  • Loading branch information
ethanndickson committed Aug 24, 2026
commit 1ac476e73a3dd490c0206f348a54b29bf83c2a5e
4 changes: 2 additions & 2 deletions coderd/x/chatd/advisor_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func advisorChatModelFixture(t *testing.T, options json.RawMessage) (database.Ch
configID := uuid.New()
providerID := uuid.New()
store := &advisorOverrideStubStore{
getChatModelConfigByID: func(context.Context, uuid.UUID) (database.ChatModelConfig, error) {
getEnabledChatModelConfigByID: func(context.Context, uuid.UUID) (database.ChatModelConfig, error) {
return database.ChatModelConfig{
ID: configID,
Model: "gpt-5.2",
Expand Down Expand Up @@ -630,7 +630,7 @@ func TestNewAdvisorRuntime(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
store := &advisorOverrideStubStore{
getChatModelConfigByID: func(context.Context, uuid.UUID) (database.ChatModelConfig, error) {
getEnabledChatModelConfigByID: func(context.Context, uuid.UUID) (database.ChatModelConfig, error) {
return database.ChatModelConfig{}, xerrors.New("lookup failed")
},
}
Expand Down
2 changes: 1 addition & 1 deletion coderd/x/chatd/modelcall_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestResolveModelCallDerivesProviderOptions(t *testing.T) {
config.Options = modelCallSentinelOptions(t, "summary-options-sentinel")
chat.LastModelConfigID = config.ID

db.EXPECT().GetChatModelConfigByID(gomock.Any(), config.ID).Return(config, nil)
db.EXPECT().GetEnabledChatModelConfigByID(gomock.Any(), config.ID).Return(config, nil)
db.EXPECT().GetAIProviderByID(gomock.Any(), providerID).Return(aibridgeTestAIProvider(providerID, "primary-openai", database.AIProviderTypeOpenai), nil).AnyTimes()
db.EXPECT().GetAIProviderKeysByProviderID(gomock.Any(), providerID).Return([]database.AIProviderKey{{
ProviderID: providerID,
Expand Down