{"id":113502,"date":"2026-10-06T15:41:08","date_gmt":"2026-10-06T07:41:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/113502.html"},"modified":"2026-10-06T15:41:08","modified_gmt":"2026-10-06T07:41:08","slug":"%e5%a4%9a%e6%a8%a1%e5%9e%8b%e7%bc%96%e6%8e%92%e7%9a%84%e4%b8%89%e5%b1%82%ef%bc%9a%e6%a1%86%e6%9e%b6%e3%80%81%e6%a8%a1%e5%9e%8b%e8%b7%af%e7%94%b1%e4%b8%8e%e6%8f%90%e4%be%9b%e5%95%86%e8%b7%af%e7%94%b1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/113502.html","title":{"rendered":"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531"},"content":{"rendered":"<h2>\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42&#xff1a;\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531<\/h2>\n<p>\u539f\u6587&#xff1a;OpenRouter Blog &#8211; \u300aLangChain vs CrewAI: Orchestration Compared to OpenRouter-Native Routing\u300b&#xff08;https:\/\/openrouter.ai\/blog\/insights\/langchain-vs-crewai-orchestration-compared-to-openrouter-native-routing\/&#xff09;<\/p>\n<p>\u505a Agent \u5e94\u7528\u65f6&#xff0c;\u300c\u591a\u6a21\u578b\u300d\u5f88\u5bb9\u6613\u88ab\u5f53\u6210\u4e00\u4ef6\u4e8b&#xff1a;\u63a5\u51e0\u4e2a\u6a21\u578b&#xff0c;\u5199\u4e2a if-else \u6311\u4e00\u4e2a\u3002\u771f\u5230\u8981\u843d\u5730\u624d\u53d1\u73b0\u8fd9\u91cc\u6df7\u7740\u4e09\u4ef6\u4e0d\u540c\u7684\u4e8b\u2014\u2014\u8c01\u8d1f\u8d23\u62c6\u4efb\u52a1\u3001\u8c01\u8d1f\u8d23\u5728\u6a21\u578b\u4e4b\u95f4\u5207\u6362\u3001\u8c01\u8d1f\u8d23\u7ed9\u540c\u4e00\u4e2a\u6a21\u578b\u6311\u670d\u52a1\u7aef\u70b9\u3002\u4e09\u5c42\u63c9\u6210\u4e00\u5c42&#xff0c;\u4ee3\u7801\u4f1a\u8d8a\u5199\u8d8a\u96be\u6539&#xff1b;\u5206\u5f00\u770b&#xff0c;\u5f88\u591a\u300c\u6211\u662f\u4e0d\u662f\u5f97\u4e0a LangGraph\u300d\u7684\u7ea0\u7ed3\u80fd\u81ea\u5df1\u56de\u7b54\u3002\u4e0b\u9762\u6309 OpenRouter 10 \u6708 2 \u65e5\u90a3\u7bc7\u5bf9\u6bd4\u6587\u7684\u7ed3\u6784\u628a\u4e09\u5c42\u644a\u5f00&#xff0c;\u518d\u7ed9\u51fa\u53ef\u4ee5\u76f4\u63a5\u8dd1\u7684\u6700\u5c0f\u4ee3\u7801\u3002<\/p>\n<h3>\u4e00\u3001\u5148\u5206\u6e05\u4e09\u5c42\u804c\u8d23<\/h3>\n<table>\n<tr>\u5c42\u56de\u7b54\u7684\u95ee\u9898\u7531\u8c01\u8d1f\u8d23<\/tr>\n<tbody>\n<tr>\n<td>\u5de5\u4f5c\u6d41\u7f16\u6392<\/td>\n<td>\u4efb\u52a1\u600e\u4e48\u62c6\u3001\u72b6\u6001\u653e\u54ea\u3001\u54ea\u4e00\u6b65\u8981\u4eba\u770b\u3001\u5b50\u4efb\u52a1\u4ea4\u7ed9\u8c01<\/td>\n<td>LangGraph\u3001CrewAI<\/td>\n<\/tr>\n<tr>\n<td>\u6a21\u578b\u8def\u7531<\/td>\n<td>\u8fd9\u4e00\u6b21\u8c03\u7528\u6253\u54ea\u4e2a\u6a21\u578b&#xff0c;\u5b83\u62a5\u9519\u4e4b\u540e\u600e\u4e48\u529e<\/td>\n<td>\u8bf7\u6c42\u91cc\u7684 models \u53c2\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u63d0\u4f9b\u5546\u8def\u7531<\/td>\n<td>\u5df2\u7ecf\u9009\u5b9a\u7684\u6a21\u578b&#xff0c;\u7531\u54ea\u4e2a\u7aef\u70b9\u6765\u670d\u52a1<\/td>\n<td>OpenRouter \u81ea\u52a8\u5b8c\u6210<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e09\u5c42\u662f\u4e09\u79cd\u4e0d\u540c\u7684\u95ee\u9898&#xff0c;\u6df7\u5728\u4e00\u4e2a\u300c\u6a21\u578b\u9009\u62e9\u5668\u300d\u91cc\u5199&#xff0c;\u540e\u9762\u4efb\u4f55\u4e00\u5c42\u8981\u6539\u90fd\u5f97\u52a8\u540c\u4e00\u5768\u4ee3\u7801\u3002\u5206\u5f00\u4e4b\u540e&#xff0c;\u4e09\u5c42\u53ef\u4ee5\u5404\u81ea\u66ff\u6362\u3002<\/p>\n<h3>\u4e8c\u3001\u5de5\u4f5c\u6d41\u7f16\u6392\u5c42&#xff1a;LangGraph \u548c CrewAI \u7ed9\u4e86\u4ec0\u4e48<\/h3>\n<p>\u8fd9\u4e00\u5c42\u89e3\u51b3\u7684\u662f\u300c\u957f\u4efb\u52a1\u600e\u4e48\u6d3b\u4e0b\u53bb\u300d&#xff0c;\u4e24\u4e2a\u4e3b\u6d41\u6846\u67b6\u8d70\u7684\u662f\u4e24\u6761\u8def\u3002<\/p>\n<h4>2.1 LangGraph&#xff1a;\u628a\u5de5\u4f5c\u6d41\u753b\u6210\u56fe<\/h4>\n<p>LangGraph \u628a\u5de5\u4f5c\u6d41\u5efa\u6a21\u6210\u4e00\u5f20\u8282\u70b9\u56fe&#xff0c;\u786e\u5b9a\u6027\u7684\u4eba\u5199\u6b65\u9aa4\u548c\u6a21\u578b\u9a71\u52a8\u7684\u6b65\u9aa4\u53ef\u4ee5\u6df7\u5728\u540c\u4e00\u5f20\u56fe\u91cc\u3002\u5b83\u9760\u4e24\u4e2a\u7ec4\u4ef6\u89e3\u51b3\u6301\u4e45\u5316&#xff1a;<\/p>\n<ul>\n<li>Checkpointer&#xff1a;\u6309 thread \u4fdd\u5b58\u56fe\u7684\u72b6\u6001&#xff0c;\u4e2d\u65ad\u540e\u53ef\u4ee5\u4ece\u65ad\u70b9\u7ee7\u7eed&#xff1b;<\/li>\n<li>Store&#xff1a;\u628a\u5e94\u7528\u6570\u636e\u5b58\u5728\u56fe\u72b6\u6001\u4e4b\u5916&#xff0c;\u8de8 thread \u590d\u7528\u72b6\u6001&#xff1b;<\/li>\n<li>interrupt()&#xff1a;\u5728\u56fe\u91cc\u4efb\u610f\u4f4d\u7f6e\u6682\u505c&#xff0c;\u7b49\u4eba\u5ba1\u6279\u540e\u7ee7\u7eed\u3002<\/li>\n<\/ul>\n<p>\u5b83\u7684\u53d6\u820d\u5f88\u6e05\u695a&#xff1a;\u63a7\u5236\u6743\u5b8c\u5168\u5728\u4f60\u624b\u91cc&#xff0c;\u4ee3\u4ef7\u662f\u8282\u70b9\u3001\u8fb9\u3001\u72b6\u6001 schema\u3001\u6301\u4e45\u5316\u914d\u7f6e\u90fd\u5f97\u81ea\u5df1\u5199\u3002<\/p>\n<h4>2.2 CrewAI&#xff1a;\u7528\u89d2\u8272\u548c\u4efb\u52a1\u63cf\u8ff0\u66ff\u4ee3\u56fe<\/h4>\n<p>CrewAI \u7684\u5fc3\u667a\u6a21\u578b\u66f4\u63a5\u8fd1\u300c\u5199\u4e00\u5f20\u4efb\u52a1\u5355\u300d&#xff0c;\u800c\u4e0d\u662f\u300c\u753b\u4e00\u5f20\u56fe\u300d&#xff1a;<\/p>\n<ul>\n<li>Crew&#xff1a;\u4e00\u7ec4 Agent&#xff0c;\u6bcf\u4e2a\u6709 role\u3001goal\u3001backstory&#xff0c;\u6309\u5206\u914d\u7684\u4efb\u52a1\u63a8\u8fdb&#xff1b;\u6d41\u7a0b\u53ef\u4ee5\u662f sequential&#xff08;\u987a\u5e8f&#xff09;&#xff0c;\u4e5f\u53ef\u4ee5\u662f hierarchical&#xff08;\u5e26\u7ba1\u7406\u8005&#xff09;&#xff1b;<\/li>\n<li>allow_delegation \u6253\u5f00\u540e Agent \u4e4b\u95f4\u53ef\u4ee5\u4e92\u76f8\u59d4\u6d3e&#xff1b;\u6bcf\u4e2a Agent \u6709 max_iter \u4e0a\u9650&#xff08;\u9ed8\u8ba4 20&#xff09;&#xff0c;\u8fd8\u53ef\u4ee5\u8bbe max_execution_time&#xff1b;<\/li>\n<li>Flow&#xff1a;\u5305\u5728 Crew \u5916\u9762\u7684\u7ed3\u6784\u5316\u3001\u4e8b\u4ef6\u9a71\u52a8\u5c42\u3002\u5b98\u65b9\u628a Flow \u5b9a\u4f4d\u6210\u5e94\u7528\u7684\u9aa8\u67b6&#xff0c;Crew \u662f\u91cc\u9762\u7684\u5de5\u4f5c\u5355\u5143\u3002<\/li>\n<\/ul>\n<p>\u4f60\u82b1\u7684\u529b\u6c14\u66f4\u591a\u5728 role \/ goal \/ task \u8fd9\u4e09\u6bb5\u6587\u5b57\u4e0a&#xff0c;\u66f4\u5c11\u5728\u8fde\u8282\u70b9\u4e0a\u3002\u4ee3\u4ef7\u662f\u628a\u66f4\u591a\u6267\u884c\u8def\u5f84\u7684\u51b3\u5b9a\u6743\u4ea4\u7ed9\u4e86 Agent \u81ea\u5df1\u3002<\/p>\n<h3>\u4e09\u3001\u6a21\u578b\u8def\u7531\u5c42&#xff1a;\u4e00\u4e2a\u5217\u8868\u5c31\u80fd\u8986\u76d6\u5927\u90e8\u5206\u9700\u6c42<\/h3>\n<p>\u8fd9\u4e00\u5c42\u4e0d\u9700\u8981\u6846\u67b6\u3002\u76f4\u63a5\u8bf7\u6c42 chat\/completions \u7aef\u70b9&#xff0c;\u628a\u5019\u9009\u6a21\u578b\u6309\u4f18\u5148\u7ea7\u5199\u8fdb models \u53c2\u6570&#xff0c;\u5269\u4e0b\u7684\u4ea4\u7ed9\u670d\u52a1\u7aef&#xff1a;\u7b2c\u4e00\u4e2a\u6a21\u578b\u62a5\u9519\u5c31\u8bd5\u4e0b\u4e00\u4e2a\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4efb\u4f55\u9519\u8bef\u90fd\u80fd\u89e6\u53d1\u56de\u9000&#xff0c;\u5305\u62ec\u4e0a\u4e0b\u6587\u957f\u5ea6\u6821\u9a8c\u5931\u8d25\u3001\u88ab\u8fc7\u6ee4\u6a21\u578b\u7684\u5ba1\u6838\u62e6\u622a\u3001\u9650\u6d41\u3001\u670d\u52a1\u4e0d\u53ef\u7528\u3002\u8ba1\u8d39\u6309\u6700\u7ec8\u63d0\u4f9b\u670d\u52a1\u7684\u90a3\u4e2a\u6a21\u578b\u7b97&#xff0c;\u54cd\u5e94\u91cc\u7684 model \u5b57\u6bb5\u544a\u8bc9\u4f60\u662f\u54ea\u4e00\u4e2a\u3002<\/p>\n<p>fallback \u53ea\u5bf9\u9519\u8bef\u751f\u6548&#xff0c;\u5b83\u4e0d\u5224\u65ad\u7b2c\u4e00\u4e2a\u6a21\u578b\u7684\u7b54\u6848\u597d\u4e0d\u597d\u3002 \u8fd9\u53e5\u8bdd\u662f\u6574\u4e2a\u8bdd\u9898\u91cc\u6700\u5bb9\u6613\u8bef\u4f1a\u7684\u5730\u65b9&#xff1a;\u60f3\u8981\u300c\u7b54\u6848\u8d28\u91cf\u4e0d\u8fbe\u6807\u5c31\u5347\u7ea7\u300d&#xff0c;\u90a3\u662f\u5de5\u4f5c\u6d41\u7f16\u6392\u5c42\u7684\u6d3b&#xff0c;\u5f97\u81ea\u5df1\u5728\u4ee3\u7801\u91cc\u5224\u3002<\/p>\n<p>\u6700\u5c0f\u53ef\u8dd1\u7684\u4f8b\u5b50&#xff08;\u5b98\u65b9\u539f\u6587\u793a\u4f8b&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u76f4\u63a5\u8bf7\u6c42 OpenRouter&#xff0c;\u7528 models \u5217\u8868\u505a\u4f18\u5148\u7ea7\u56de\u9000<\/span><br \/>\n<span class=\"token keyword\">import<\/span> os<br \/>\n<span class=\"token keyword\">import<\/span> requests<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">route<\/span><span class=\"token punctuation\">(<\/span>models<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">list<\/span><span class=\"token punctuation\">[<\/span><span class=\"token builtin\">str<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> prompt<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token builtin\">tuple<\/span><span class=\"token punctuation\">[<\/span><span class=\"token builtin\">str<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    response <span class=\"token operator\">&#061;<\/span> requests<span class=\"token punctuation\">.<\/span>post<span class=\"token punctuation\">(<\/span><br \/>\n        <span class=\"token string\">&#034;https:\/\/openrouter.ai\/api\/v1\/chat\/completions&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        headers<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;Authorization&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;Bearer <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>os<span class=\"token punctuation\">.<\/span>environ<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;OPENROUTER_API_KEY&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token comment\"># models \u662f\u6709\u5e8f\u56de\u9000\u5217\u8868&#xff1a;\u7b2c\u4e00\u4e2a\u62a5\u9519\u5c31\u7528\u4e0b\u4e00\u4e2a<\/span><br \/>\n        json<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;models&#034;<\/span><span class=\"token punctuation\">:<\/span> models<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;role&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;content&#034;<\/span><span class=\"token punctuation\">:<\/span> prompt<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        timeout<span class=\"token operator\">&#061;<\/span><span class=\"token number\">120<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><br \/>\n    response<span class=\"token punctuation\">.<\/span>raise_for_status<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    body <span class=\"token operator\">&#061;<\/span> response<span class=\"token punctuation\">.<\/span>json<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token comment\"># \u8fd4\u56de\u503c\u91cc\u5e26\u4e0a\u662f\u54ea\u4e2a\u6a21\u578b\u771f\u6b63\u670d\u52a1\u7684&#xff0c;\u65b9\u4fbf\u57cb\u70b9<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> body<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;choices&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;message&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;content&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> body<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;model&#034;<\/span><span class=\"token punctuation\">]<\/span><\/p>\n<p>draft<span class=\"token punctuation\">,<\/span> draft_model <span class=\"token operator\">&#061;<\/span> route<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;anthropic\/claude-sonnet-5&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;openai\/gpt-5.6-sol&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;Draft a one-paragraph summary of what a model fallback list does.&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\nreview<span class=\"token punctuation\">,<\/span> review_model <span class=\"token operator\">&#061;<\/span> route<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;openai\/gpt-5.6-sol&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;anthropic\/claude-sonnet-5&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;Review this draft for accuracy and suggest one improvement:\\\\n\\\\n<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>draft<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;draft by <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>draft_model<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">, review by <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>review_model<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>review<span class=\"token punctuation\">)<\/span><\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u91cc\u4e09\u4e2a\u53c2\u6570\u503c\u5f97\u8bb0\u4e00\u4e0b&#xff1a;models \u662f\u6709\u5e8f\u5217\u8868&#xff0c;\u8d8a\u9760\u524d\u8d8a\u4f18\u5148&#xff1b;timeout \u7ed9\u8db3&#xff08;\u793a\u4f8b\u53d6 120 \u79d2&#xff09;&#xff0c;\u56e0\u4e3a\u56de\u9000\u610f\u5473\u7740\u53ef\u80fd\u771f\u7684\u8dd1\u5b8c\u4e00\u6b21\u624d\u5931\u8d25&#xff1b;\u8fd4\u56de\u503c\u76f4\u63a5\u53d6 model \u5b57\u6bb5\u3002\u62ff\u5230\u5b83\u4ee5\u540e\u5efa\u8bae\u7acb\u523b\u6253\u70b9\u2014\u2014\u56de\u9000\u7387\u3001\u56de\u9000\u6700\u7ec8\u547d\u4e2d\u54ea\u4e2a\u6a21\u578b&#xff0c;\u662f\u5224\u65ad\u8fd9\u6761\u94fe\u5065\u4e0d\u5065\u5eb7\u7684\u7b2c\u4e00\u624b\u6570\u636e\u3002<\/p>\n<p>\u540c\u6837\u7684\u4e24\u6b65\u6d41\u7a0b\u6362\u6210 LangChain&#xff0c;\u5199\u6cd5\u662f\u7ed9\u6bcf\u4e2a\u6a21\u578b\u5bf9\u8c61\u6302 fallbacks&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u540c\u6837\u7684\u4e8b\u60c5\u6362\u6210 LangChain&#xff1a;\u7f16\u6392\u7531\u6846\u67b6\u7ba1&#xff0c;\u6a21\u578b\u5c42\u4ecd\u7136\u8d70 OpenRouter<\/span><br \/>\n<span class=\"token keyword\">from<\/span> langchain_openrouter <span class=\"token keyword\">import<\/span> ChatOpenRouter<\/p>\n<p>drafter <span class=\"token operator\">&#061;<\/span> ChatOpenRouter<span class=\"token punctuation\">(<\/span>model<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;anthropic\/claude-sonnet-5&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>with_fallbacks<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span>ChatOpenRouter<span class=\"token punctuation\">(<\/span>model<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;openai\/gpt-5.6-sol&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\nreviewer <span class=\"token operator\">&#061;<\/span> ChatOpenRouter<span class=\"token punctuation\">(<\/span>model<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;openai\/gpt-5.6-sol&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>with_fallbacks<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span>ChatOpenRouter<span class=\"token punctuation\">(<\/span>model<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;anthropic\/claude-sonnet-5&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p>draft <span class=\"token operator\">&#061;<\/span> drafter<span class=\"token punctuation\">.<\/span>invoke<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Draft a one-paragraph summary of what a model fallback list does.&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nreview <span class=\"token operator\">&#061;<\/span> reviewer<span class=\"token punctuation\">.<\/span>invoke<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;Review this draft for accuracy and suggest one improvement:\\\\n\\\\n<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>draft<span class=\"token punctuation\">.<\/span>content<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>review<span class=\"token punctuation\">.<\/span>content<span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5bf9\u6bd4\u4e24\u6bb5\u4ee3\u7801\u80fd\u770b\u51fa\u5206\u5de5&#xff1a;\u4e00\u4e2a\u662f\u4f60\u81ea\u5df1\u5199\u8c03\u7528\u987a\u5e8f&#xff0c;\u4e00\u4e2a\u662f\u6846\u67b6\u66ff\u4f60\u7ba1\u6d41\u7a0b\u3002\u6a21\u578b\u5c42\u7684\u90e8\u5206&#xff08;\u7528\u54ea\u4e9b\u6a21\u578b\u3001\u51fa\u9519\u600e\u4e48\u9000&#xff09;\u4e24\u8fb9\u5b8c\u5168\u4e00\u6837\u3002<\/p>\n<h3>\u56db\u3001\u63d0\u4f9b\u5546\u8def\u7531\u5c42&#xff1a;\u540c\u4e00\u4e2a\u6a21\u578b&#xff0c;\u4e0d\u540c\u7aef\u70b9<\/h3>\n<p>\u4e00\u4e2a\u6a21\u578b\u5728 OpenRouter \u4e0a\u5f80\u5f80\u6709\u591a\u4e2a\u63d0\u4f9b\u5546\u5728\u670d\u52a1\u3002\u63d0\u4f9b\u5546\u8def\u7531\u6362\u7684\u662f\u7aef\u70b9&#xff0c;\u4e0d\u662f\u6a21\u578b&#xff1a;\u4f60\u8bf7\u6c42\u7684\u662f\u540c\u4e00\u4e2a\u6a21\u578b&#xff0c;\u7cfb\u7edf\u5728\u7b26\u5408\u6761\u4ef6\u7684\u63d0\u4f9b\u5546\u91cc\u6311\u4e00\u4e2a\u3002\u5f53\u8bf7\u6c42\u91cc\u5e26\u5de5\u5177\u65f6&#xff0c;Auto Exacto \u9ed8\u8ba4\u751f\u6548&#xff0c;\u6309\u541e\u5410\u3001\u5de5\u5177\u8c03\u7528\u6210\u529f\u7387\u3001\u57fa\u51c6\u6570\u636e\u91cd\u6392\u63d0\u4f9b\u5546\u987a\u5e8f\u3002<\/p>\n<p>\u8fd9\u4e00\u5c42\u5e73\u65f6\u4e0d\u9700\u8981\u4f60\u64cd\u5fc3&#xff0c;\u4f46\u5bf9 Agent \u573a\u666f\u6709\u4e24\u5c42\u542b\u4e49&#xff1a;\u5de5\u5177\u8c03\u7528\u5bc6\u96c6\u7684\u94fe\u8def&#xff0c;\u7aef\u70b9\u8d28\u91cf\u4f1a\u76f4\u63a5\u5f71\u54cd\u6210\u529f\u7387&#xff1b;\u800c\u8fd9\u7c7b\u91cd\u6392\u53d1\u751f\u5728\u300c\u4f60\u5df2\u7ecf\u9009\u5b9a\u7684\u6a21\u578b\u300d\u5185\u90e8&#xff0c;\u4e0d\u4f1a\u6084\u6084\u6362\u6210\u53e6\u4e00\u4e2a\u6a21\u578b\u3002<\/p>\n<h3>\u4e94\u3001\u4e2d\u95f4\u90a3\u4e00\u6bb5&#xff1a;\u5e26\u8fb9\u754c\u7684\u5de5\u5177\u5faa\u73af<\/h3>\n<p>\u5f88\u591a Agent \u65e2\u4e0d\u9700\u8981\u4e00\u5f20\u6301\u4e45\u5316\u7684\u56fe&#xff0c;\u4e5f\u4e0d\u9700\u8981\u4e00\u652f\u5e26\u89d2\u8272\u7684\u56e2\u961f&#xff0c;\u53ea\u9700\u8981\u4e00\u4e2a\u300c\u6709\u4e0a\u9650\u7684\u591a\u8f6e\u5de5\u5177\u5faa\u73af\u300d\u3002OpenRouter \u7684 Agent SDK \u5c31\u662f\u51b2\u8fd9\u4e00\u6bb5\u6765\u7684&#xff08;\u793a\u4f8b\u4e3a\u5b98\u65b9 TypeScript \u4ee3\u7801&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u6709\u754c\u7684\u591a\u8f6e\u5de5\u5177\u5faa\u73af&#xff1a;\u505c\u6b62\u6761\u4ef6\u5199\u5728\u8c03\u7528\u91cc<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> OpenRouter<span class=\"token punctuation\">,<\/span> tool<span class=\"token punctuation\">,<\/span> stepCountIs<span class=\"token punctuation\">,<\/span> maxCost <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;&#064;openrouter\/agent&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> z <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;zod&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> client <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">OpenRouter<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span> apiKey<span class=\"token operator\">:<\/span> process<span class=\"token punctuation\">.<\/span>env<span class=\"token punctuation\">.<\/span><span class=\"token constant\">OPENROUTER_API_KEY<\/span> <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> result <span class=\"token operator\">&#061;<\/span> client<span class=\"token punctuation\">.<\/span><span class=\"token function\">callModel<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n  model<span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;anthropic\/claude-sonnet-5&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  input<span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;What time is it in Tokyo?&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  tools<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token function\">tool<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n      name<span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;get_time&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      description<span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;Get the current time in a timezone&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      inputSchema<span class=\"token operator\">:<\/span> z<span class=\"token punctuation\">.<\/span><span class=\"token function\">object<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span> timezone<span class=\"token operator\">:<\/span> z<span class=\"token punctuation\">.<\/span><span class=\"token function\">string<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token function-variable function\">execute<\/span><span class=\"token operator\">:<\/span> <span class=\"token keyword\">async<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span> timezone <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        time<span class=\"token operator\">:<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">Date<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">toLocaleString<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;en-US&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">{<\/span> timeZone<span class=\"token operator\">:<\/span> timezone <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token comment\">\/\/ \u4ec0\u4e48\u65f6\u5019\u505c&#xff1a;\u6b65\u6570\u4e0a\u9650\u6216\u6210\u672c\u4e0a\u9650&#xff0c;\u5148\u5230\u5148\u505c<\/span><br \/>\n  stopWhen<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token function\">stepCountIs<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">maxCost<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0.5<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> text <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> result<span class=\"token punctuation\">.<\/span><span class=\"token function\">getText<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token builtin\">console<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">log<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>stepCountIs(5) \u548c maxCost(0.5) \u662f\u505c\u6b62\u6761\u4ef6&#xff0c;\u4e0d\u662f\u6d88\u8d39\u4e0a\u9650\u2014\u2014\u539f\u6587\u7279\u610f\u70b9\u660e\u4e86\u8fd9\u4e00\u70b9&#xff1a;\u8fbe\u5230\u6761\u4ef6\u5faa\u73af\u5c31\u505c&#xff0c;\u522b\u628a\u5b83\u5f53\u6210\u8d26\u5355\u5c01\u9876\u3002\u8be5 SDK \u91cc\u8fd8\u6709\u4e00\u4e2a openrouter:subagent \u80fd\u529b&#xff0c;\u6807\u6ce8\u4e3a beta\u3002<\/p>\n<h3>\u516d\u3001\u5bf9\u7167\u8868\u4e0e\u9009\u578b\u5efa\u8bae<\/h3>\n<table>\n<tr>LangGraphCrewAI\u76f4\u63a5\u8def\u7531<\/tr>\n<tbody>\n<tr>\n<td>\u4e3a\u8c01\u800c\u751f<\/td>\n<td>\u663e\u5f0f\u72b6\u6001\u3001\u6301\u4e45\u5316\u3001\u4eba\u5de5\u5ba1\u6279\u7684\u56fe\u5f0f\u7f16\u6392<\/td>\n<td>\u4e8b\u4ef6\u9a71\u52a8 Flow \u91cc\u7684\u89d2\u8272\u5236 Agent \u56e2\u961f<\/td>\n<td>\u6bcf\u6b21\u8c03\u7528\u9009\u6a21\u578b\u3001\u9519\u8bef\u9a71\u52a8\u56de\u9000\u3001\u63d0\u4f9b\u5546\u8def\u7531<\/td>\n<\/tr>\n<tr>\n<td>\u591a\u6a21\u578b\u652f\u6301<\/td>\n<td>\u6bcf\u4e2a\u8282\u70b9\u6216 Agent \u4e00\u4e2a\u6a21\u578b\u5bf9\u8c61<\/td>\n<td>\u6bcf\u4e2a Agent\u3001Crew \u6216 manager \u4e00\u4e2a LLM<\/td>\n<td>\u6bcf\u4e2a\u8bf7\u6c42\u4e00\u4e2a models \u5217\u8868<\/td>\n<\/tr>\n<tr>\n<td>\u89c4\u5212\u3001\u8bb0\u5fc6\u3001\u59d4\u6d3e<\/td>\n<td>\u6709&#xff0c;\u5199\u5728\u56fe\u3001Checkpointer\u3001Store \u91cc<\/td>\n<td>\u6709&#xff0c;\u901a\u8fc7 Agent\u3001\u6d41\u7a0b\u4e0e Flow \u72b6\u6001<\/td>\n<td>\u6ca1\u6709&#xff0c;\u53ea\u6709\u8def\u7531<\/td>\n<\/tr>\n<tr>\n<td>\u6d41\u5f0f\u8f93\u51fa<\/td>\n<td>\u6709<\/td>\n<td>\u6709&#xff0c;Crew \u7ea7\u522b<\/td>\n<td>\u6709&#xff0c;\u6309\u8bf7\u6c42<\/td>\n<\/tr>\n<tr>\n<td>\u4eba\u5de5\u4ecb\u5165<\/td>\n<td>interrupt &#043; Checkpointer<\/td>\n<td>\u81ea\u5df1\u5199 Flow \u903b\u8f91<\/td>\n<td>\u4e0d\u63d0\u4f9b<\/td>\n<\/tr>\n<tr>\n<td>\u4f60\u8981\u5199\u4ec0\u4e48<\/td>\n<td>\u8282\u70b9\u3001\u8fb9\u3001\u72b6\u6001 schema\u3001\u6301\u4e45\u5316\u914d\u7f6e<\/td>\n<td>Agent\u3001Task\u3001Crew\u3001Flow \u5b9a\u4e49<\/td>\n<td>\u4e00\u4e2a\u8bf7\u6c42\u4f53<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9009\u578b\u4e0a\u539f\u6587\u7684\u5efa\u8bae\u5f88\u5b9e\u9645&#xff1a;\u5148\u505a\u5c0f\u627f\u8bfa\u3002 \u60f3\u4e0d\u6e05\u695a\u9700\u4e0d\u9700\u8981\u6846\u67b6&#xff0c;\u5c31\u5148\u7528 models \u5217\u8868\u628a\u4e00\u4e2a\u4e24\u6b65\u6d41\u7a0b\u8de8\u4e24\u4e2a\u6a21\u578b\u8dd1\u901a&#xff0c;\u518d\u5224\u65ad\u662f\u4e0d\u662f\u771f\u9700\u8981\u4e0a\u9762\u90a3\u5c42\u3002\u4e24\u5c42\u4e0d\u4e92\u76f8\u66ff\u4ee3&#xff0c;\u4e5f\u4e0d\u9700\u8981\u4e3a\u4e86\u62ff\u5230\u4e0b\u9762\u4e24\u5c42\u800c\u5148\u5f15\u5165\u6846\u67b6\u2014\u2014\u4e00\u4e2a\u5217\u8868\u52a0\u51e0\u4e2a if \u5c31\u80fd\u5728\u591a\u6a21\u578b\u95f4\u8def\u7531\u3002<\/p>\n<p>\u53cd\u8fc7\u6765&#xff0c;\u5982\u679c\u4f60\u5df2\u7ecf\u5728\u7528 LangChain \u6216 CrewAI&#xff0c;\u4e5f\u6ca1\u5fc5\u8981\u6362\u6389&#xff1a;LangChain \u6709\u4e13\u95e8\u7684 ChatOpenRouter \u96c6\u6210&#xff0c;CrewAI \u901a\u8fc7 LLM \u7c7b\u628a OpenRouter \u5f53 provider\u3002\u4fdd\u7559\u6846\u67b6\u7684\u7f16\u6392&#xff0c;\u628a\u6a21\u578b\u4e0e\u63d0\u4f9b\u5546\u8def\u7531\u653e\u5728\u4e0b\u9762\u4e00\u5c42&#xff0c;\u662f\u66f4\u5e38\u89c1\u7684\u7ec4\u5408\u3002<\/p>\n<h3>\u4e03\u3001\u7ed9 Agent \u5f00\u53d1\u5b66\u4e60\u8005\u7684\u542f\u793a<\/h3>\n<p>\u771f\u6b63\u7684\u5206\u754c\u7ebf\u4e0d\u662f\u300c\u7528\u4e0d\u7528\u6846\u67b6\u300d&#xff0c;\u800c\u662f\u300c\u72b6\u6001\u8981\u4e0d\u8981\u8de8\u8f6e\u3001\u8de8\u8fd0\u884c\u6d3b\u4e0b\u53bb\u300d\u3002 \u9700\u8981\u4eba\u5de5\u5ba1\u6279\u3001\u9700\u8981\u65ad\u70b9\u7eed\u8dd1\u3001\u9700\u8981\u628a\u5b50\u4efb\u52a1\u7a33\u5b9a\u5730\u6d3e\u7ed9\u4e0d\u540c Agent&#xff0c;\u5c31\u4e0a\u7f16\u6392\u5c42&#xff1b;\u53ea\u8981\u4e00\u6b21\u8bf7\u6c42\u5185\u628a\u6d3b\u5e72\u5b8c&#xff0c;\u4e00\u4e2a models \u5217\u8868\u5f80\u5f80\u5c31\u591f\u4e86&#xff0c;\u591a\u5f15\u5165\u4e00\u5c42\u53ea\u662f\u591a\u4e00\u5c42\u8981\u7ef4\u62a4\u7684\u4e1c\u897f\u3002<\/p>\n<p>\u53e6\u5916\u4e24\u6761\u53ef\u4ee5\u76f4\u63a5\u62ff\u6765\u7528\u7684\u7ecf\u9a8c&#xff1a;\u56de\u9000\u7b56\u7565\u8981\u6309\u9519\u8bef\u7c7b\u578b\u68b3\u7406\u4e00\u904d&#xff0c;\u522b\u9ed8\u8ba4\u300c\u6240\u6709\u9519\u8bef\u90fd\u8be5\u56de\u9000\u300d\u2014\u2014\u6bd4\u5982\u5185\u5bb9\u5ba1\u6838\u62e6\u622a&#xff0c;\u56de\u9000\u5230\u53e6\u4e00\u4e2a\u6a21\u578b\u5927\u6982\u7387\u8fd8\u662f\u88ab\u62e6&#xff0c;\u767d\u767d\u591a\u82b1\u4e00\u6b21\u8c03\u7528&#xff1b;\u5de5\u5177\u8c03\u7528\u94fe\u8def\u7684\u6210\u529f\u7387\u8981\u8ddf\u7aef\u70b9\u8d28\u91cf\u4e00\u8d77\u770b&#xff0c;\u5de5\u5177\u5bc6\u96c6\u65f6\u8fd9\u7c7b\u5dee\u5f02\u4f1a\u88ab\u653e\u5927\u3002<\/p>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>\u591a\u6a21\u578b\u7f16\u6392\u662f\u4e09\u5c42&#xff1a;\u5de5\u4f5c\u6d41\u7f16\u6392\u8d1f\u8d23\u89c4\u5212\u3001\u72b6\u6001\u3001\u8bb0\u5fc6\u4e0e\u59d4\u6d3e&#xff0c;LangGraph \u7528\u56fe\u6362\u6765\u663e\u5f0f\u63a7\u5236&#xff0c;CrewAI \u7528\u89d2\u8272\u4e0e Flow \u6362\u6765\u66f4\u5c11\u7684\u8fde\u8fb9\u5de5\u4f5c&#xff1b;\u6a21\u578b\u8def\u7531\u8d1f\u8d23\u9009\u6a21\u578b\u548c\u5728\u62a5\u9519\u65f6\u56de\u9000&#xff0c;\u4e00\u4e2a models \u5217\u8868\u5373\u53ef&#xff1b;\u63d0\u4f9b\u5546\u8def\u7531\u8d1f\u8d23\u5728\u540c\u4e00\u4e2a\u6a21\u578b\u7684\u591a\u4e2a\u7aef\u70b9\u95f4\u6311\u9009&#xff0c;\u5e76\u5728\u5e26\u5de5\u5177\u65f6\u4f18\u5148\u5de5\u5177\u8c03\u7528\u8d28\u91cf\u3002\u4e09\u5c42\u53ef\u4ee5\u62c6\u5f00\u7528&#xff0c;\u4e5f\u53ef\u4ee5\u53e0\u8d77\u6765\u7528\u2014\u2014\u5148\u5224\u65ad\u9898\u76ee\u7684\u8fb9\u754c&#xff0c;\u518d\u51b3\u5b9a\u8981\u4e0d\u8981\u6846\u67b6\u3002<\/p>\n<p>\u6587\u4e2d\u6a21\u578b\u540d\u4e0e\u4ee3\u7801\u6765\u81ea OpenRouter \u539f\u6587\u793a\u4f8b&#xff0c;\u6846\u67b6\u4e0e SDK \u7684\u5177\u4f53\u7248\u672c\u8bf7\u4ee5\u5b98\u65b9\u6587\u6863\u4e3a\u51c6&#xff0c;\u6b64\u5904\u672a\u9a8c\u8bc1\u6700\u65b0\u7248\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42&#xff1a;\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531\u539f\u6587&#xff1a;OpenRouter Blog &#8211; \u300aLangChain vs CrewAI: Orchestration Compared to OpenRouter-Native Routing\u300b&#xff08;https:\/\/openrouter.ai\/blog\/insights\/langchain-vs-crewai-orchestration-compared-to-openrouter-native-r<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12918,12919,11653,50,87,78],"topic":[],"class_list":["post-113502","post","type-post","status-publish","format-standard","hentry","category-server","tag-12918","tag-12919","tag-11653","tag-50","tag-87","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/113502.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42&#xff1a;\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531\u539f\u6587&#xff1a;OpenRouter Blog - \u300aLangChain vs CrewAI: Orchestration Compared to OpenRouter-Native Routing\u300b&#xff08;https:\/\/openrouter.ai\/blog\/insights\/langchain-vs-crewai-orchestration-compared-to-openrouter-native-r\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/113502.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-06T07:41:08+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113502.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/113502.html\",\"name\":\"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-06T07:41:08+00:00\",\"dateModified\":\"2026-10-06T07:41:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/113502.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/113502.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113502.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/113502.html","og_locale":"zh_CN","og_type":"article","og_title":"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42&#xff1a;\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531\u539f\u6587&#xff1a;OpenRouter Blog - \u300aLangChain vs CrewAI: Orchestration Compared to OpenRouter-Native Routing\u300b&#xff08;https:\/\/openrouter.ai\/blog\/insights\/langchain-vs-crewai-orchestration-compared-to-openrouter-native-r","og_url":"https:\/\/www.wsisp.com\/helps\/113502.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-06T07:41:08+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/113502.html","url":"https:\/\/www.wsisp.com\/helps\/113502.html","name":"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-06T07:41:08+00:00","dateModified":"2026-10-06T07:41:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/113502.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/113502.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/113502.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u591a\u6a21\u578b\u7f16\u6392\u7684\u4e09\u5c42\uff1a\u6846\u67b6\u3001\u6a21\u578b\u8def\u7531\u4e0e\u63d0\u4f9b\u5546\u8def\u7531"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/113502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=113502"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/113502\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=113502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=113502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=113502"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=113502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}