feat(clients): openrouter: whole public API, spec-checked call table, chat model, demo

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 07:46:42 +02:00
co-authored by Claude Sonnet 5.5
parent 2e0270c043
commit 9a24bedc7c
54 changed files with 7109 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
// Route: GET /ai/openrouter (page, no credential needed)
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto res = f.client->get("/ai/openrouter");
check(res.status == 200, "status 200");
check(contains(res.headers.get("Content-Type"), "text/html"), "html");
check(contains(res.body, "OpenRouter") && contains(res.body, "viewport"), "page and mobile viewport");
check(contains(res.body, "/embedded/ai_openrouter.js"), "script wired");
check(f.client->post("/ai/openrouter", "{}", "application/json").status == 405, "post is 405");
return finish("ai/openrouter/page");
}