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

Function openAICompatTestModel

coderd/x/chatd/quickgen_internal_test.go:745–765  ·  view source on GitHub ↗
(t *testing.T, baseURL string)

Source from the content-addressed store, hash-verified

743}
744
745func openAICompatTestModel(t *testing.T, baseURL string) fantasy.LanguageModel {
746 t.Helper()
747
748 model, err := chatprovider.ModelFromConfig(
749 fantasyopenaicompat.Name,
750 "anthropic/claude-4-5-sonnet",
751 chatprovider.ProviderAPIKeys{
752 ByProvider: map[string]string{
753 fantasyopenaicompat.Name: "test-key",
754 },
755 BaseURLByProvider: map[string]string{
756 fantasyopenaicompat.Name: baseURL,
757 },
758 },
759 chatprovider.UserAgent(),
760 nil,
761 nil,
762 )
763 require.NoError(t, err)
764 return model
765}
766
767func TestGenerateStructuredTurnStatusLabel(t *testing.T) {
768 t.Parallel()

Calls 3

ModelFromConfigFunction · 0.92
UserAgentFunction · 0.92
HelperMethod · 0.65

Tested by

no test coverage detected