(t *testing.T)
| 296 | } |
| 297 | |
| 298 | func TestReasoningEffortFromChat(t *testing.T) { |
| 299 | t.Parallel() |
| 300 | |
| 301 | tests := []struct { |
| 302 | name string |
| 303 | provider string |
| 304 | input *string |
| 305 | want *string |
| 306 | }{ |
| 307 | { |
| 308 | name: "OpenAICaseInsensitive", |
| 309 | provider: "openai", |
| 310 | input: ptr.Ref(" HIGH "), |
| 311 | want: ptr.Ref(string(fantasyopenai.ReasoningEffortHigh)), |
| 312 | }, |
| 313 | { |
| 314 | name: "OpenAIXHighEffort", |
| 315 | provider: "openai", |
| 316 | input: ptr.Ref("xhigh"), |
| 317 | want: ptr.Ref(string(fantasyopenai.ReasoningEffortXHigh)), |
| 318 | }, |
| 319 | { |
| 320 | name: "AnthropicEffort", |
| 321 | provider: "anthropic", |
| 322 | input: ptr.Ref("max"), |
| 323 | want: ptr.Ref(string(fantasyanthropic.EffortMax)), |
| 324 | }, |
| 325 | { |
| 326 | name: "AnthropicXHighEffort", |
| 327 | provider: "anthropic", |
| 328 | input: ptr.Ref("xhigh"), |
| 329 | want: ptr.Ref(string(fantasyanthropic.EffortXHigh)), |
| 330 | }, |
| 331 | { |
| 332 | name: "OpenRouterEffort", |
| 333 | provider: "openrouter", |
| 334 | input: ptr.Ref("medium"), |
| 335 | want: ptr.Ref(string(fantasyopenrouter.ReasoningEffortMedium)), |
| 336 | }, |
| 337 | { |
| 338 | name: "VercelEffort", |
| 339 | provider: "vercel", |
| 340 | input: ptr.Ref("xhigh"), |
| 341 | want: ptr.Ref(string(fantasyvercel.ReasoningEffortXHigh)), |
| 342 | }, |
| 343 | { |
| 344 | name: "InvalidEffortReturnsNil", |
| 345 | provider: "openai", |
| 346 | input: ptr.Ref("unknown"), |
| 347 | want: nil, |
| 348 | }, |
| 349 | { |
| 350 | name: "UnsupportedProviderReturnsNil", |
| 351 | provider: "bedrock", |
| 352 | input: ptr.Ref("high"), |
| 353 | want: nil, |
| 354 | }, |
| 355 | { |
nothing calls this directly
no test coverage detected