wxMaxima
Loading...
Searching...
No Matches
Macros | Functions
test_AiProvider.cpp File Reference

Pins each AiProvider's request/response shape – the stateless half of AiProvider (BuildRequestBody()/ParseReply(), pure JSON in and out, see AiProvider.h for why this split exists). More...

#include "ai/AiProvider.cpp"
#include <catch2/catch.hpp>
Include dependency graph for test_AiProvider.cpp:

Functions

 SCENARIO ("Anthropic's Messages API request/response shape")
 
 SCENARIO ("OpenAI's (and Qwen's identical) chat/completions shape")
 
 SCENARIO ("Google Gemini's generateContent shape")
 
 SCENARIO ("MakeAiProvider(AiProviderKind::None, ...) returns nullptr")
 
 SCENARIO ("MakeAiProviderForShape() reuses each shape's real implementation " "against an arbitrary URL")
 
 SCENARIO ("AiCustomProviderConfig JSON round-trips through Serialize/Parse")
 
 SCENARIO ("NewAiCustomProviderId() produces distinct, non-empty ids")
 
 SCENARIO ("AiKnownLocalServerPresets() lists usable OpenAI-compatible presets")
 
int main (int argc, char *argv[])
 

Detailed Description

Pins each AiProvider's request/response shape – the stateless half of AiProvider (BuildRequestBody()/ParseReply(), pure JSON in and out, see AiProvider.h for why this split exists).

The actual network call (SendChat(), wxWebRequest-based) is not exercised here – no live network access or API keys are available in this sandbox; verified live instead in a real Xvfb session (see AGENTS.md's AI chat sidebar entry).