HTML 77.2%
TypeScript 10.5%
Python 9.6%
JavaScript 2.5%
1import pytest23from aiatlas.connectors.labs.deepseek import DOCS, DeepSeekConnector4from aiatlas.sdk.facts import Target5from tests.conftest import claims_of, extract_from_fixture, fixture_path678@pytest.fixture9def connector() -> DeepSeekConnector:10 return DeepSeekConnector()111213async def test_pricing(connector):14 facts = await extract_from_fixture(connector, Target(url=f"{DOCS}/quick_start/pricing", doc_type="pricing", key="pricing"), fixture_path("deepseek", "pricing.html"))15 models = {e.name: e for e in facts.entities if e.entity_type == "model"}16 assert set(models) == {"DeepSeek-V4.1-Flash", "DeepSeek-V4-Pro-0813"}17 flash = models["DeepSeek-V4.1-Flash"]18 assert flash.identifiers == {"deepseek_model_id": "deepseek-flash"} and {"deepseek-flash", "deepseek-v4-flash"} <= set(flash.aliases)19 c = claims_of(facts, "DeepSeek-V4.1-Flash")20 assert c["context_length"] == 1_000_000 and c["max_output_tokens"] == 384_00021 assert c["tool_calling"] is True and c["structured_output"] is True and c["vision"] is True and c["reasoning"] is True22 assert claims_of(facts, "DeepSeek-V4-Pro-0813")["vision"] is False23 by_id = {p.provider_model_id: p for p in facts.prices}24 flash_p = by_id["deepseek-flash"]25 assert (flash_p.input_per_mtok, flash_p.cached_input_per_mtok, flash_p.output_per_mtok) == (0.3, 0.006, 1.2)26 assert flash_p.features["off_peak_input_per_mtok"] == 0.15 and flash_p.features["off_peak_output_per_mtok"] == 0.627 pro_p = by_id["deepseek-v4-pro"]28 assert (pro_p.input_per_mtok, pro_p.cached_input_per_mtok, pro_p.output_per_mtok) == (1.32, 0.044, 3.96)29 assert pro_p.provider.identifiers["registry_provider"] == "deepseek"303132async def test_changelog(connector):33 facts = await extract_from_fixture(connector, Target(url=f"{DOCS}/updates", doc_type="listing", key="changelog"), fixture_path("deepseek", "updates.html"))34 assert len(facts.events) >= 2035 first = facts.events[0]36 assert first.summary == "DeepSeek: DeepSeek-V4.1-Flash Release" and first.effective_at.date().isoformat() == "2026-09-10" and first.category == "release"37 assert "deepseek-flash" in first.meta["summary"] or "V4.1" in first.meta["summary"]38 assert len({e.dedupe_key for e in facts.events}) == len(facts.events)39 news = [t for t in facts.targets if t.doc_type == "news_index"]40 assert len(news) == 1 and news[0].url == f"{DOCS}/news/news260910"414243async def test_news_index(connector):44 facts = await extract_from_fixture(connector, Target(url=f"{DOCS}/news/news260910", doc_type="news_index", key="news_index"), fixture_path("deepseek", "news-260910.html"))45 events = {e.source_url: e for e in facts.events}46 assert len(events) >= 1547 pro = events[f"{DOCS}/news/news260813"]48 assert pro.summary == "DeepSeek: DeepSeek-V4-Pro GA Release" and pro.effective_at.date().isoformat() == "2026-08-13" and pro.category == "release"49 assert events[f"{DOCS}/news/news250120"].summary == "DeepSeek: DeepSeek-R1 Release"50 assert any(t.needs_llm and t.meta.get("llm_task") == "release_announcement" for t in facts.targets)51