G0~G8 성과·동맹 측정 OS 작업 일괄 고정
8월 7일까지 워킹트리에만 남아 있던 미커밋 작업을 커밋한다. 여러 사본 폴더(worktree·clone)에 흩어져 있던 중간 스냅샷을 정리하기 전에 원본을 git 이력으로 고정하는 것이 목적이다. - contracts/routes/services: measurement, outcome_trajectory, rupture_repair, deliberate_practice, calibration_transfer, supervision_research, multimodal_alliance, continuous_improvement 계열 신규 모듈과 테스트 - infra/db/init: 07~16 마이그레이션(측정 기반~calibration transfer 실행) - apps/web: 세션 리뷰 카드·관리 화면·E2E 스펙 추가 - docs/ops: G0~G8 라이브 통합·배포·롤백 증거 문서와 evidence JSON/PNG - scripts: smoke·ledger·릴리스 에이전트·NAS 프리뷰 운영 스크립트 engine.public 로그 .bak과 apps/web/test-results 산출물은 커밋에서 제외했다.
This commit is contained in:
parent
93dd8f82d7
commit
16e791e044
390 changed files with 243188 additions and 499 deletions
48
apps/api/app/test_llm_pricing.py
Normal file
48
apps/api/app/test_llm_pricing.py
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from .services.llm_pricing import estimate_reference_cost
|
||||
|
||||
|
||||
class LlmPricingTest(unittest.TestCase):
|
||||
def test_agy_gemini_reasoning_suffix_uses_base_model_standard_rate(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="agy_cli",
|
||||
model="gemini-3.6-flash-high",
|
||||
tokens_in=35_703,
|
||||
tokens_out=1_129,
|
||||
)
|
||||
|
||||
self.assertIsNotNone(estimate)
|
||||
assert estimate is not None
|
||||
self.assertEqual(estimate.cost_usd, 0.062022)
|
||||
self.assertIn("Gemini 3.6 Flash", estimate.rate_label)
|
||||
|
||||
def test_codex_credit_rate_accounts_for_cached_input(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="codex_cli",
|
||||
model="gpt-5.6-terra",
|
||||
tokens_in=12,
|
||||
cached_input_tokens=2,
|
||||
tokens_out=3,
|
||||
)
|
||||
|
||||
self.assertIsNotNone(estimate)
|
||||
assert estimate is not None
|
||||
self.assertEqual(estimate.cost_usd, 0.0000705)
|
||||
self.assertIn("크레딧 환산", estimate.rate_label)
|
||||
|
||||
def test_unknown_model_does_not_invent_a_price(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="agy_cli",
|
||||
model="gpt-oss-120b-medium",
|
||||
tokens_in=1000,
|
||||
tokens_out=100,
|
||||
)
|
||||
|
||||
self.assertIsNone(estimate)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue