MCPcopy
hub / github.com/multica-ai/multica / TestCursorUsageModelFallback

Function TestCursorUsageModelFallback

server/pkg/agent/cursor_test.go:254–276  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

252}
253
254func TestCursorUsageModelFallback(t *testing.T) {
255 t.Parallel()
256
257 tests := []struct {
258 name string
259 evtModel string
260 configuredModel string
261 want string
262 }{
263 {"event model wins", "gpt-5.3-codex", "composer-2.5", "gpt-5.3-codex"},
264 {"configured model fallback", "", "composer-2.5", "composer-2.5"},
265 {"default cursor", "", "", "cursor"},
266 }
267
268 for _, tc := range tests {
269 t.Run(tc.name, func(t *testing.T) {
270 got := cursorUsageModel(tc.evtModel, tc.configuredModel)
271 if got != tc.want {
272 t.Fatalf("cursorUsageModel(%q, %q) = %q, want %q", tc.evtModel, tc.configuredModel, got, tc.want)
273 }
274 })
275 }
276}
277
278func TestCursorAccumulateResultUsageUsesConfiguredModel(t *testing.T) {
279 t.Parallel()

Callers

nothing calls this directly

Calls 2

cursorUsageModelFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected