3 Commits

Author SHA1 Message Date
de97fd8ac9 Merge pull request 'fix: add starlette/httpx to dev deps, guard test_openai_compat imports' (#2) from devin/1777359479-fix-openai-compat-tests into main
Some checks failed
Tests / test (3.10) (push) Failing after 39s
Tests / test (3.11) (push) Failing after 36s
Tests / test (3.12) (push) Successful in 38s
Tests / lint (push) Successful in 34s
Tests / docker (push) Successful in 1m45s
2026-04-28 08:19:12 +00:00
Devin AI
59d57cb2fb fix: add starlette/httpx to dev deps, guard test_openai_compat imports
Some checks failed
Tests / test (3.10) (pull_request) Failing after 40s
Tests / test (3.11) (pull_request) Failing after 36s
Tests / test (3.12) (pull_request) Successful in 41s
Tests / lint (pull_request) Successful in 34s
Tests / docker (pull_request) Successful in 1m47s
- Add starlette>=0.36 and httpx>=0.27 to dev dependencies so
  test_openai_compat.py can run in dev environments
- Add pytest.importorskip guards for starlette and fastapi so the
  test file is skipped gracefully when those packages are missing
- Fix import sorting (ruff I001)

340 tests now pass (was 325 with test_openai_compat skipped).

Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
2026-04-28 06:58:05 +00:00
99bbbccacb Merge pull request 'feat: GPU/TensorCore integration — TensorFlow backend, accelerated reasoning, training & memory' (#1) from devin/1777352172-gpu-tensorcore-integration into main
Some checks failed
Tests / test (3.10) (push) Failing after 36s
Tests / test (3.11) (push) Failing after 35s
Tests / test (3.12) (push) Successful in 39s
Tests / lint (push) Successful in 33s
Tests / docker (push) Successful in 1m49s
2026-04-28 06:32:06 +00:00
2 changed files with 21 additions and 8 deletions

View File

@@ -35,6 +35,8 @@ dev = [
"pytest>=7.4", "pytest>=7.4",
"mypy>=1.8", "mypy>=1.8",
"ruff>=0.4", "ruff>=0.4",
"starlette>=0.36",
"httpx>=0.27",
] ]
all = ["fusionagi[openai,anthropic,local,gpu]"] all = ["fusionagi[openai,anthropic,local,gpu]"]

View File

@@ -1,20 +1,31 @@
"""Tests for OpenAI-compatible API bridge.""" """Tests for OpenAI-compatible API bridge.
Requires the ``api`` or ``dev`` extra (starlette, httpx).
Skipped gracefully when those packages are not installed.
"""
import json import json
import os import os
import pytest import pytest
from starlette.testclient import TestClient
from fusionagi.adapters import StubAdapter pytest.importorskip("starlette", reason="starlette not installed (pip install fusionagi[dev])")
from fusionagi.api.app import create_app pytest.importorskip("fastapi", reason="fastapi not installed (pip install fusionagi[api])")
from fusionagi.api.openai_compat.translators import (
messages_to_prompt, from starlette.testclient import TestClient # noqa: E402
from fusionagi.adapters import StubAdapter # noqa: E402
from fusionagi.api.app import create_app # noqa: E402
from fusionagi.api.openai_compat.translators import ( # noqa: E402
estimate_usage, estimate_usage,
final_response_to_openai, final_response_to_openai,
messages_to_prompt,
)
from fusionagi.schemas.witness import ( # noqa: E402
AgreementMap,
FinalResponse,
TransparencyReport,
) )
from fusionagi.schemas.witness import AgreementMap, FinalResponse, TransparencyReport
# Stub adapter responses for Dvādaśa heads and Witness # Stub adapter responses for Dvādaśa heads and Witness
HEAD_OUTPUT = { HEAD_OUTPUT = {