用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace --skill openevidence-rate-limits命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Deploy a LangChain 1.0 / LangGraph 1.0 app to Cloud Run, Vercel, or LangServe correctly — with timeouts sized for chain length, cold-start mitigation, SSE anti-buffering headers, and Secret Manager over .env. Use when prepping a first production deploy, debugging a stream that hangs behind a proxy, or diagnosing p99 latency spikes. Trigger with "langchain deploy", "langchain cloud run", "langchain vercel python", "langchain langserve", or "langchain docker".
Build a correct LangGraph 1.0 ReAct agent with create_react_agent — typed tools, error propagation, recursion caps, and stop conditions that actually stop. Use when writing a first tool-calling agent, migrating from AgentExecutor or initialize_agent, or diagnosing an agent that loops on vague prompts. Trigger with "langgraph agent", "create_react_agent", "langgraph tool calling", "AgentExecutor migration", or "agent loop cost".
Build LangGraph 1.0 human-in-the-loop approval flows with interrupt_before / interrupt_after and Command(resume=...) — JSON-serializable state, clean resume semantics, and UI wiring for approval decisions. Use when adding an approval gate before an expensive tool call, wiring a Slack/web UI for agent approvals, or debugging a graph that crashes on interrupt. Trigger with "langgraph human in loop", "langgraph interrupt_before", "langgraph approval flow", "Command resume", "langgraph HITL".
正在显示 SKILL.md
| name | openevidence-rate-limits |
| description | Rate Limits for OpenEvidence. Trigger: "openevidence rate limits". |
| allowed-tools | Read, Write, Edit |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","openevidence","healthcare"] |
| compatibility | Designed for Claude Code |
OpenEvidence's clinical decision support API enforces strict rate limits to ensure reliable evidence retrieval for healthcare applications. Clinical query endpoints are throttled per API key, with lower limits on evidence synthesis calls that involve AI-powered literature analysis. In clinical settings, rate limiting directly impacts patient care workflows, so implementations must prioritize graceful degradation over retry storms. Batch research queries during off-peak hours and cache evidence summaries aggressively since medical literature changes infrequently.
| Endpoint | Limit | Window | Scope |
|---|---|---|---|
| Clinical query | 30 req | 1 minute | Per API key |
| Evidence synthesis | 10 req | 1 minute | Per API key |
| Literature search | 60 req | 1 minute | Per API key |
| Citation retrieval | 120 req | 1 minute | Per API key |
| Bulk evidence export | 5 req | 1 hour | Per API key |
class OpenEvidenceRateLimiter {
private tokens: number;
private lastRefill: number;
private readonly max: number;
private readonly refillRate: number;
private queue: Array<{ resolve: () => void }> = [];
constructor(maxPerMinute: number) {
this.max = maxPerMinute;
this.tokens = maxPerMinute;
this.lastRefill = Date.now();
this.refillRate = maxPerMinute / 60_000;
}
async acquire(): Promise<void> {
this.refill();
if (this.tokens >= 1) { this.tokens -= 1; return; }
return new ( ..({ resolve }));
}
() {
now = .();
. = .(., . + (now - .) * .);
. = now;
(. >= && ..) {
. -= ;
..()!.();
}
}
}
queryLimiter = ();
synthesisLimiter = ();
async function openEvidenceRetry<T>(
limiter: OpenEvidenceRateLimiter, fn: () => Promise<Response>, maxRetries = 3
): Promise<T> {
for (let attempt = 0; attempt <= maxRetries; attempt++) {
await limiter.acquire();
const res = await fn();
if (res.ok) return res.json();
if (res.status === 429) {
const retryAfter = parseInt(res.headers.get("Retry-After") || "30", 10);
const jitter = Math.random() * 2000;
await new Promise(r => setTimeout(r, retryAfter * 1000 + jitter));
continue;
}
if (res.status >= 500 && attempt < maxRetries) {
await new Promise(r => (r, .(, attempt) * ));
;
}
();
}
();
}
async function batchClinicalQueries(queries: string[], batchSize = 5) {
const results: any[] = [];
for (let i = 0; i < queries.length; i += batchSize) {
const batch = queries.slice(i, i + batchSize);
const batchResults = await Promise.all(
batch.map(q => openEvidenceRetry(queryLimiter, () =>
fetch(`${OE_BASE}/api/v1/clinical/query`, {
method: "POST", headers,
body: JSON.stringify({ question: q, includeEvidence: true }),
})
))
);
results.push(...batchResults);
if (i + batchSize < queries.length) await new Promise(r => setTimeout(r, 12_000));
}
return results;
}
| Issue | Cause | Fix |
|---|---|---|
| 429 on clinical query | Exceeded 30 req/min query cap | Queue queries, return cached if available |
| 429 on synthesis | Synthesis limit (10/min) is strict | Pre-cache common drug interaction queries |
| Synthesis timeout | Complex multi-study analysis | Set 120s timeout, poll async endpoint |
| 401 key expired | API key rotation missed | Automate key rotation with 7-day buffer |
| Stale evidence | Cached result older than 30 days | Set TTL on cache, re-query on expiry |
See openevidence-performance-tuning.