MCPcopy Index your code
hub / github.com/coder/coder / createDisabledChatModelConfig

Function createDisabledChatModelConfig

coderd/exp_chats_test.go:10705–10720  ·  view source on GitHub ↗
(
	t *testing.T,
	client *codersdk.ExperimentalClient,
	provider string,
	model string,
)

Source from the content-addressed store, hash-verified

10703}
10704
10705func createDisabledChatModelConfig(
10706 t *testing.T,
10707 client *codersdk.ExperimentalClient,
10708 provider string,
10709 model string,
10710) codersdk.ChatModelConfig {
10711 t.Helper()
10712
10713 modelConfig := createAdditionalChatModelConfig(t, client, provider, model)
10714 ctx := testutil.Context(t, testutil.WaitLong)
10715 updated, err := client.UpdateChatModelConfig(ctx, modelConfig.ID, codersdk.UpdateChatModelConfigRequest{
10716 Enabled: ptr.Ref(false),
10717 })
10718 require.NoError(t, err)
10719 return updated
10720}
10721
10722func enableUserChatProviderKey(
10723 t testing.TB,

Calls 5

ContextFunction · 0.92
RefFunction · 0.92
HelperMethod · 0.65
UpdateChatModelConfigMethod · 0.65

Tested by

no test coverage detected