MCPcopy Create free account
hub / github.com/coder/coder / TestIsReasoningModel

Function TestIsReasoningModel

coderd/x/chatd/chatopenai/options_test.go:399–427  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

397}
398
399func TestIsReasoningModel(t *testing.T) {
400 t.Parallel()
401
402 tests := []struct {
403 model string
404 want bool
405 }{
406 {model: ""},
407 {model: "o"},
408 {model: "o1", want: true},
409 {model: "o1-mini", want: true},
410 {model: "o3.5", want: true},
411 {model: "o10-preview", want: true},
412 {model: "oabc"},
413 {model: "ox"},
414 {model: "o1preview"},
415 {model: "gpt-5"},
416 {model: "O1"},
417 }
418
419 for _, tt := range tests {
420 t.Run(tt.model, func(t *testing.T) {
421 t.Parallel()
422
423 got := chatopenai.IsReasoningModel(tt.model)
424 require.Equal(t, tt.want, got)
425 })
426 }
427}
428
429func requireStringPointerValue(t *testing.T, value *string) string {
430 t.Helper()

Callers

nothing calls this directly

Calls 3

IsReasoningModelFunction · 0.92
RunMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected