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:
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user