From a3da74a01d633b48d2cc74a25f7369db5b812eeb Mon Sep 17 00:00:00 2001 From: vasilije Date: Fri, 29 Aug 2025 21:49:28 +0200 Subject: [PATCH] add open router --- .github/workflows/test_openrouter.yml | 30 +++++++++++++++++++++++++++ .github/workflows/test_suites.yml | 9 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/test_openrouter.yml diff --git a/.github/workflows/test_openrouter.yml b/.github/workflows/test_openrouter.yml new file mode 100644 index 000000000..9c2dcdebe --- /dev/null +++ b/.github/workflows/test_openrouter.yml @@ -0,0 +1,30 @@ +name: test | openrouter + +on: + workflow_call: + +jobs: + test-openrouter: + name: Run OpenRouter Test + runs-on: ubuntu-22.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Cognee Setup + uses: ./.github/actions/cognee_setup + with: + python-version: '3.11.x' + + - name: Run OpenRouter Simple Example + env: + LLM_PROVIDER: "custom" + LLM_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} + LLM_MODEL: "openrouter/x-ai/grok-code-fast-1" + LLM_ENDPOINT: "https://openrouter.ai/api/v1" + EMBEDDING_PROVIDER: "openai" + EMBEDDING_API_KEY: ${{ secrets.OPENAI_API_KEY }} + EMBEDDING_MODEL: "openai/text-embedding-3-large" + EMBEDDING_DIMENSIONS: "3072" + EMBEDDING_MAX_TOKENS: "8191" + run: uv run python ./examples/python/simple_example.py diff --git a/.github/workflows/test_suites.yml b/.github/workflows/test_suites.yml index f4e86d544..34a2c2e02 100644 --- a/.github/workflows/test_suites.yml +++ b/.github/workflows/test_suites.yml @@ -115,6 +115,12 @@ jobs: uses: ./.github/workflows/test_gemini.yml secrets: inherit + openrouter-tests: + name: OpenRouter Tests + needs: [basic-tests, e2e-tests, cli-tests] + uses: ./.github/workflows/test_openrouter.yml + secrets: inherit + # Ollama tests moved to the end ollama-tests: name: Ollama Tests @@ -128,6 +134,7 @@ jobs: vector-db-tests, example-tests, gemini-tests, + openrouter-tests, mcp-test, relational-db-migration-tests, docker-compose-test, @@ -150,6 +157,7 @@ jobs: db-examples-tests, mcp-test, gemini-tests, + openrouter-tests, ollama-tests, relational-db-migration-tests, docker-compose-test, @@ -171,6 +179,7 @@ jobs: "${{ needs.db-examples-tests.result }}" == "success" && "${{ needs.relational-db-migration-tests.result }}" == "success" && "${{ needs.gemini-tests.result }}" == "success" && + "${{ needs.openrouter-tests.result }}" == "success" && "${{ needs.docker-compose-test.result }}" == "success" && "${{ needs.docker-ci-test.result }}" == "success" && "${{ needs.ollama-tests.result }}" == "success" ]]; then