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 ("GitHub Models -- GitHub's own official, OpenAI-compatible model API")
 
 SCENARIO ("DeepSeek and OpenRouter -- OpenAI-compatible, each at its own URL")
 
 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")
 
 SCENARIO ("The API-style picker's index <-> shape mapping round-trips")
 
 SCENARIO ("A provider with no API key sends no credential header at all")
 
 SCENARIO ("AiProviderRequestUrlProblem() rejects what actually gets typed")
 
 SCENARIO ("A custom provider with a username authenticates with HTTP Basic")
 
 SCENARIO ("A custom provider's username survives the config round trip")
 
int main (int argc, char *argv[])
 
 SCENARIO ("Each provider derives its model-list URL from its chat endpoint")
 
 SCENARIO ("Parsing a provider's model list")
 

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).