openrouter-compliance-review
Review OpenRouter integration for regulatory compliance (SOC2, GDPR,
openevidence-upgrade-migration
Upgrade Migration for OpenEvidence.
Full skill instructions
OpenEvidence is a clinical AI platform that provides evidence-based medical answers and clinical decision support. The API exposes endpoints for clinical queries, evidence retrieval, and citation management. Tracking API changes is critical because OpenEvidence evolves its evidence grading schema, citation format, and clinical query response structure — and breaking changes in a healthcare context can surface outdated medical evidence, alter confidence scores, or remove critical safety disclaimers that downstream clinical applications depend on.
const OPENEVIDENCE_BASE = "https://api.openevidence.com/v1";
async function detectOpenEvidenceVersion(apiKey: string): Promise<void> {
const res = await fetch(`${OPENEVIDENCE_BASE}/status`, {
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
});
const version = res.headers.get("x-openevidence-api-version") ?? "v1";
console.log(`OpenEvidence API version: ${version}`);
// Test clinical query response schema
const queryRes = await fetch(`${OPENEVIDENCE_BASE}/query`, {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({ question: "What is the recommended treatment for hypertension?", max_citations: 1 }),
});
const data = await queryRes.json();
const hasStructuredCitations = data.citations?.[0]?.evidence_grade !== undefined;
console.log(`Structured citations: ${hasStructuredCitations}`);
const hasDisclaimers = data.disclaimers !== undefined;
console.log(`Disclaimers field present: ${hasDisclaimers}`);
}
// OpenEvidence query response: flat answer → structured evidence with grading
interface OldQueryResponse {
answer: string;
citations: Array<{ title: string; url: string; source: string }>;
confidence: number;
}
interface NewQueryResponse {
answer: { text: string; sections: Array<{ heading: string; content: string }> };
citations: Array<{
title: string;
url: string;
source: string;
pmid?: string;
doi?: string;
evidence_grade: "A" | "B" | "C" | "D" | "expert_opinion";
publication_year: number;
}>;
confidence: { score: number; level: "high" | "moderate" | "low"; basis: string };
disclaimers: string[];
query_metadata: { specialty: string; guidelines_version: string };
}
function migrateQueryResponse(old: OldQueryResponse): NewQueryResponse {
return {
answer: { text: old.answer, sections: [{ heading: "Summary", content: old.answer }] },
citations: old.citations.map((c) => ({
...c,
evidence_grade: "C" as const,
publication_year: 0,
})),
confidence: { score: old.confidence, level: old.confidence > 0.7 ? "high" : "moderate", basis: "legacy" },
disclaimers: ["This information is for educational purposes. Consult a healthcare provider."],
query_metadata: { specialty: "general", guidelines_version: "unknown" },
};
}
class OpenEvidenceClient {
private apiVersion: "v1" | "v2";
constructor(private apiKey: string, version: "v1" | "v2" = "v2") {
this.apiVersion = version;
}
async query(question: string, options?: { specialty?: string }): Promise<any> {
try {
const res = await fetch(`https://api.openevidence.com/${this.apiVersion}/query`, {
method: "POST",
headers: { Authorization: `Bearer ${this.apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({ question, ...options }),
});
if (!res.ok) throw new Error(`OpenEvidence ${res.status}`);
return await res.json();
} catch (err) {
if (this.apiVersion === "v2") {
console.warn("Falling back to OpenEvidence API v1");
this.apiVersion = "v1";
return this.query(question, options);
}
throw err;
}
}
}
| Migration Issue | Symptom | Fix |
|---|---|---|
| Evidence grade scale changed | Grade returns "level-1" instead of "A" | Map new grade scale to internal representation using lookup table |
| Citation format restructured | Missing pmid field, now nested under identifiers.pmid | Update citation parser for new nested identifier structure |
| Disclaimer field required | Integration missing safety warnings in user-facing output | Always render disclaimers[] array from query response |
| Specialty taxonomy expanded | 400 with unknown specialty on filtered queries | Fetch current specialties from /specialties endpoint |
| Streaming format changed | SSE parser breaks on new event structure | Update event stream parser for new data: payload format |
For CI pipeline integration, see openevidence-ci-integration.
Review OpenRouter integration for regulatory compliance (SOC2, GDPR,
Data synchronization, ETL patterns, and data management for MaintainX.
Execute Groq primary workflow: chat completions with tool use and JSON
Validate CSRF protection implementations for security gaps. Use when
Configure this skill should be used when the user asks about "API contract",
Execute Ideogram incident response with triage, mitigation, and postmortem.
Execute create, select, and transform features to improve machine learning
Reusable patterns for the Gamma REST API (no SDK exists).
Apply production-ready Deepgram SDK patterns for TypeScript and Python.
Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model
Diagnose and fix common OpenRouter API errors. Use when encountering
Optimize Linear API usage, reduce unnecessary calls, and maximize
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience