운영 점검 결함 수정: 감독 주기 충돌, 로그인 확인 지연, 비용 단가
Some checks failed
API contract / OpenAPI type drift (push) Failing after 6m30s
Some checks failed
API contract / OpenAPI type drift (push) Failing after 6m30s
- 감독·연구 생성 주기: 교육과정 공백·근거 묶음 제출 번호 지문이 저장 내용 전체(상태·불확실도·영향 학습자 수·근거 포인터)를 덮게 해, 9월 근거 링크 변경 뒤 매시 반복되던 제출 번호 충돌과 코호트 롤백을 없앤다. - 세션 복원: last_seen_at 갱신을 60초 간격으로 묶어 로그인 요청마다 생기던 확정 쓰기 2회를 줄인다. 관리자 권한 승격은 즉시 반영한다. - 비용: OpenAI API gpt-5.6-terra 공식 표준 단가(2026-07-30부터)를 참조 단가에 추가해 관리자 비용 화면의 $0 표시를 바로잡는다. - 음성 합성 실패(502) 원인을 서버 기록에 남긴다.
This commit is contained in:
parent
cc4a943ad8
commit
7facf961c5
8 changed files with 566 additions and 10 deletions
|
|
@ -115,6 +115,69 @@ class LlmPricingTest(unittest.TestCase):
|
|||
self.assertEqual(estimate.cost_usd, 0.0000705)
|
||||
self.assertIn("크레딧 환산", estimate.rate_label)
|
||||
|
||||
def test_openai_api_gpt_5_6_terra_standard_rate(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="openai",
|
||||
model="gpt-5.6-terra",
|
||||
tokens_in=1_000_000,
|
||||
tokens_out=100_000,
|
||||
priced_at=date(2026, 10, 25),
|
||||
)
|
||||
|
||||
self.assertIsNotNone(estimate)
|
||||
assert estimate is not None
|
||||
self.assertEqual(estimate.cost_usd, 3.20)
|
||||
self.assertIn("openai-api-gpt-5.6-terra-standard@2026-07-30", estimate.rate_id)
|
||||
|
||||
def test_openai_api_gpt_5_6_terra_accounts_for_cached_input(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="openai",
|
||||
model="gpt-5.6-terra",
|
||||
tokens_in=1_000_000,
|
||||
cached_input_tokens=200_000,
|
||||
tokens_out=100_000,
|
||||
priced_at=date(2026, 10, 25),
|
||||
)
|
||||
|
||||
self.assertIsNotNone(estimate)
|
||||
assert estimate is not None
|
||||
self.assertEqual(estimate.cost_usd, 2.84)
|
||||
|
||||
def test_openai_api_gpt_5_6_terra_is_unavailable_before_price_start(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="openai",
|
||||
model="gpt-5.6-terra",
|
||||
tokens_in=1_000_000,
|
||||
tokens_out=100_000,
|
||||
priced_at=date(2026, 7, 29),
|
||||
)
|
||||
|
||||
self.assertIsNone(estimate)
|
||||
|
||||
def test_openai_api_gpt_5_6_terra_matches_dated_suffix(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="openai",
|
||||
model="gpt-5.6-terra-2026-08-01",
|
||||
tokens_in=1_000,
|
||||
tokens_out=100,
|
||||
priced_at=date(2026, 10, 25),
|
||||
)
|
||||
|
||||
self.assertIsNotNone(estimate)
|
||||
assert estimate is not None
|
||||
self.assertEqual(estimate.cost_usd, 0.0032)
|
||||
|
||||
def test_openai_other_model_does_not_invent_a_price(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="openai",
|
||||
model="gpt-5.6-sol",
|
||||
tokens_in=1_000,
|
||||
tokens_out=100,
|
||||
priced_at=date(2026, 10, 25),
|
||||
)
|
||||
|
||||
self.assertIsNone(estimate)
|
||||
|
||||
def test_unknown_model_does_not_invent_a_price(self) -> None:
|
||||
estimate = estimate_reference_cost(
|
||||
provider="agy_cli",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue