Skip to content

Conversation

@TorrentBrave
Copy link

@TorrentBrave TorrentBrave commented Sep 21, 2025

i want to use openrouter api for free instead of openai or deepseek api, but use openrouter api directly will run error
image

for fix this problem, i add some code for fit openrouter api in health_check.py, thanks to this action, i can use R&D_Agent for free today

Screenshot from 2025-09-21 13-50-43 Screenshot from 2025-09-21 13-50-32

📚 Documentation preview 📚: https://RDAgent--1253.org.readthedocs.build/en/1253/

@TorrentBrave
Copy link
Author

@TorrentBrave please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.@TorrentBrave请阅读以下贡献者许可协议 (CLA)。如果您同意 CLA,请回复以下信息。

@microsoft-github-policy-service agree [company="{your company}"]

Options:选项:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.(默认 - 未指定公司)我拥有我的提交内容的知识产权的唯一所有权,并且我不会在为我的雇主工作过程中提交提交内容。
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.(当公司给出时)我在为我的雇主工作过程中提交提交材料(或者我的雇主根据合同或适用法律对我的提交内容拥有知识产权)。我已获得雇主的许可,可以代表我的雇主提交意见并签订本协议。通过在下面签名,定义的术语“您”包括我和我的雇主。
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

Contribution License Agreement

贡献许可协议

This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”), and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your 并为您的 Microsoft Corporation 及其附属公司(“Microsoft”)转让某些许可权 contributions to Microsoft open source projects. This Agreement is effective as of the latest signature 对 Microsoft 开源项目的贡献。本协议自最近签署之日起生效 date below. 日期如下。本贡献许可协议(“协议”)由以下签署方(“您”)同意,

1. **Definitions**.
   **“Code”** means the computer software code, whether in human-readable or machine-executable form,
   that is delivered by You to Microsoft under this Agreement.
   由您根据本协议交付给 Microsoft 的。
   **“Project”** means any of the projects owned or managed by Microsoft and offered under a license
   approved by the Open Source Initiative ([www.opensource.org](http://www.opensource.org)).
   **“Submit”** is the act of uploading, submitting, transmitting, or distributing code or other content to any
   Project, including but not limited to communication on electronic mailing lists, source code control
   项目,包括但不限于电子邮件列表上的通信、源代码控制
   systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
   系统,以及由本项目管理或代表本项目管理的问题跟踪系统,以便
   discussing and improving that Project, but excluding communication that is conspicuously marked or
   讨论和改进该项目,但不包括明显标记或
   otherwise designated in writing by You as “Not a Submission.”
   否则,您以书面形式指定为“非提交”。
   **“Submission”** means the Code and any other copyrightable material Submitted by You, including any
   associated comments and documentation.
   相关注释和文档。定义。“代码”是指计算机软件代码,无论是人类可读还是机器可执行的形式,“项目”是指 Microsoft 拥有或管理并在许可下提供的任何项目
   经开源倡议 (www.opensource.org) 批准。“提交”是指将代码或其他内容上传、提交、传输或分发给任何人的行为“提交”是指代码和您提交的任何其他受版权保护的材料,包括任何

2. **Your Submission**. You must agree to the terms of this Agreement before making a Submission to any
   Project. This Agreement covers any and all Submissions that You, now or in the future (except as
   项目。本协议涵盖您现在或将来的任何和所有提交内容(除非
   described in Section 4 below), Submit to any Project.
   下文第 4 节所述),提交给任何项目。您的提交。您必须先同意本协议的条款,然后才能向任何

3. **Originality of Work**. You represent that each of Your Submissions is entirely Your original work.
   Should You wish to Submit materials that are not Your original work, You may Submit them separately
   如果您希望提交非您的原创作品的材料,您可以单独提交
   to the Project if You (a) retain all copyright and license information that was in the materials as You
   如果您 (a) 保留材料中的所有版权和许可信息,则 (a) 保留材料中的所有版权和许可信息,则
   received them, (b) in the description accompanying Your Submission, include the phrase “Submission
   收到它们,(b) 在您的提交内容随附的描述中,包含短语“提交
   containing materials of a third party:” followed by the names of the third party and any licenses or other
   包含第三方材料:“,然后是第三方的名称和任何许可或其他
   restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
   您知悉的限制,以及 (c) 遵循项目书面中的任何其他说明
   guidelines concerning Submissions.
   有关提交的指南。作品的独创性。您声明您的每一份提交内容完全是您的原创作品。

4. **Your Employer**. References to “employer” in this Agreement include Your employer or anyone else
   for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
   您为谁提交提交内容,例如作为承包商、供应商或代理人。如果您的
   Submission is made in the course of Your work for an employer or Your employer has intellectual
   提交是在您为雇主工作或您的雇主有知识分子的过程中提交的
   property rights in Your Submission by contract or applicable law, You must secure permission from Your
   根据合同或适用法律对您提交的内容的财产权,您必须获得您的许可
   employer to make the Submission before signing this Agreement. In that case, the term “You” in this
   雇主在签署本协议之前提交材料。在这种情况下,此处的术语“您”
   Agreement will refer to You and the employer collectively. If You change employers in the future and
   协议将统称为您和雇主。如果您将来更换雇主并且
   desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
   希望为新雇主提交其他提交材料,则您同意签署新协议
   and secure permission from the new employer before Submitting those Submissions.
   并在提交这些提交之前获得新雇主的许可。您的雇主。本协议中提及的“雇主”包括您的雇主或任何其他人

5. **Licenses**.许可证。


* **Copyright License**. You grant Microsoft, and those who receive the Submission directly or
  indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
  间接来自 Microsoft,这是永久的、全球性的、非排他性的、免版税的、不可撤销的许可证。
  Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
  提交复制、制作衍生作品、公开展示、公开表演和分发
  the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
  提交内容和此类衍生作品,并将任何或所有上述权利再许可给第三方
  parties.
  各方。版权许可。您授予 Microsoft 以及直接接收提交的人员或

* **Patent License**. You grant Microsoft, and those who receive the Submission directly or
  indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
  间接来自 Microsoft,这是永久的、全球性的、非排他性的、免版税的、不可撤销的许可
  Your patent claims that are necessarily infringed by the Submission or the combination of the
  您的专利权利要求必然受到提交或
  Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
  提交与提交的项目一起提交,以制造、已经制作、使用、要约出售、出售和
  import or otherwise dispose of the Submission alone or with the Project.
  单独导入或以其他方式处置提交内容或与项目一起处置。专利许可。您授予 Microsoft 以及直接接收提交的人员或

* **Other Rights Reserved**. Each party reserves all rights not expressly granted in this Agreement.
  No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
  没有任何额外的许可或权利(包括但不限于任何默示许可)
  granted by implication, exhaustion, estoppel or otherwise.
  以暗示、用尽、禁止反言或其他方式授予。保留其他权利。各方保留本协议中未明确授予的所有权利。


6. **Representations and Warranties**. You represent that You are legally entitled to grant the above
   licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
   许可证。您声明您的每项提交内容完全是您的原创作品(除非您
   have disclosed under Section 3). You represent that You have secured permission from Your employer to
   已根据第 3 节披露)。您声明您已获得雇主的许可
   make the Submission in cases where Your Submission is made in the course of Your work for Your
   如果您的提交是在您为您的工作过程中提交的,则提交
   employer or Your employer has intellectual property rights in Your Submission by contract or applicable
   雇主或您的雇主通过合同或适用的方式对您的提交内容拥有知识产权
   law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
   法律。如果您代表您的雇主签署本协议,则您声明并保证您
   have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
   拥有必要的权力,使所列雇主遵守本协议中包含的义务。
   You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
   除非您选择这样做,否则您不应为您的提交提供支持。除非
   REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
   适用法律要求或书面同意,但保证除外
   EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
   第 3、4 和 6 节明确规定,根据本协议提供的提交内容是
   PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
   提供不提供任何形式的保证,包括但不限于任何
   NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
   不侵权、适销性或适合特定用途。陈述和保证。您声明您在法律上有权授予上述内容

7. **Notice to Microsoft**. You agree to notify Microsoft in writing of any facts or circumstances of which
   You later become aware that would make Your representations in this Agreement inaccurate in any
   您后来意识到,这将使您在本协议中的陈述在任何情况下都不准确
   respect.
   尊。给 Microsoft 的通知。您同意以书面形式通知 Microsoft 任何事实或情况,其中

8. **Information about Submissions**. You agree that contributions to Projects and information about
   contributions may be maintained indefinitely and disclosed publicly, including Your name and other
   贡献可以无限期保留并公开披露,包括您的姓名和其他
   information that You submit with Your Submission.
   您随提交时提交的信息。有关提交的信息。您同意对项目的贡献和有关

9. **Governing Law/Jurisdiction**. This Agreement is governed by the laws of the State of Washington, and
   the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
   双方同意在金县的联邦法院拥有专属管辖权和审判地,
   Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
   华盛顿,除非不存在联邦标的物管辖权,在这种情况下,双方同意
   exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
   华盛顿州金县高等法院的专属管辖权和审判地。双方放弃所有
   defenses of lack of personal jurisdiction and forum non-conveniens.
   缺乏属人管辖权和不方便法院的辩护。适用法律/管辖权。本协议受华盛顿州法律管辖,并且

10. **Entire Agreement/Assignment**. This Agreement is the entire agreement between the parties, and
    supersedes any and all prior agreements, understandings or communications, written or oral, between
    取代之前任何及所有书面或口头的协议、谅解或通信
    the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.
    与本协议标的物有关的各方。本协议可能由 Microsoft 转让。完整协议/转让。本协议是双方之间的完整协议,并且

@microsoft-github-policy-service agree

@Hoder-zyf
Copy link
Collaborator

In fact, my test shows that openrouter could be called using current structure, include these lines in your .env:

BACKEND=rdagent.oai.backend.LiteLLMAPIBackend
OPENAI_API_KEY="your open-router api-key"
OPENAI_API_BASE="https://openrouter.ai/api/v1"
CHAT_MODEL="the full model-name on openrouter"

@TorrentBrave
Copy link
Author

In fact, my test shows that openrouter could be called using current structure, include these lines in your .env:

BACKEND=rdagent.oai.backend.LiteLLMAPIBackend
OPENAI_API_KEY="your open-router api-key"
OPENAI_API_BASE="https://openrouter.ai/api/v1"
CHAT_MODEL="the full model-name on openrouter"

actually, in my test the full model-name on openrouter is not ok :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants