feat(clients): openai platform: 188-call table, 217 events, WebSocket sessions, checker, demo

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 08:00:04 +02:00
co-authored by Claude Sonnet 5.5
parent 2e0270c043
commit 2a15d43d3b
60 changed files with 5788 additions and 3 deletions
@@ -0,0 +1,25 @@
// Routes: GET /ai/openai/platform, /status, /calls, /events
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
setenv("MOLO_ENV_FILES", "off", 1);
unsetenv("OPENAI_API_KEY");
Fixture f;
auto page = f.client->get("/ai/openai/platform");
check(page.status == 200 && contains(page.body, "OpenAI platform"), "page 200");
check(contains(page.body, "ai_openai_platform.js"), "page loads its script");
auto st = f.client->get("/ai/openai/platform/status");
check(st.status == 200 && contains(st.body, "\"configured\":false"), "status without key");
check(contains(st.body, "\"credential_env\":\"OPENAI_API_KEY\""), "status names the env var");
check(contains(st.body, "\"calls\":188"), "status counts calls");
auto calls = f.client->get("/ai/openai/platform/calls");
check(calls.status == 200 && contains(calls.body, "createVectorStoreFileBatch"), "calls lists the table");
auto ev = f.client->get("/ai/openai/platform/events");
check(ev.status == 200 && contains(ev.body, "input_audio_buffer.append"), "events lists the catalog");
check(f.client->post("/ai/openai/platform/status", "{}", "application/json").status == 405, "post status is 405");
check(f.client->post("/ai/openai/platform", "{}", "application/json").status == 405, "post page is 405");
check(f.client->get("/ai/openai/platform/call").status == 405, "get call is 405");
return finish("ai/openai/platform/status");
}