发布

  • [OPIK-7288] [BE] feat: persist cipx payment-plan and thinking/settings fields (#7481)

    frostbyte_neo 发布于 2026-07-15 16:58:24 +00:00

    • [OPIK-7288] [BE] feat: persist cipx payment-plan and thinking/settings fields

    Ingest the new cipx fields the proxy now emits (OPIK-7288).

    cipx_spends (migration 000101) — per-call config from cipx.call.config:
    effort, thinking_type, thinking_budget, max_tokens, context_management.

    cipx_trace_identities (migration 000102) — payment plan from
    cipx.session.identity: billing_mode (subscription/api), plan (max/pro),
    plan_usage_status (within/over). The three ticket buckets derive from
    billing_mode + plan_usage_status.

    Additive columns (defaults empty/0). CipxSpendDAO / CipxTraceIdentityDAO
    parse the fields and bind them; ingestion test extended to assert them.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • fix(dev-runner): wire cost-api MySQL env to renamed OPIK_DB_* vars

    ai-cost-backend renamed its MySQL settings mysql_* -> opik_db_* (OPIK-7287),
    so cost-api now reads OPIK_DB_HOST/PORT/NAME/USERNAME/PASSWORD. dev-runner
    still exported the old MYSQL_* names, which no longer bind, so cost-api fell
    back to its default host "mysql" (unresolvable from the host uvicorn process)
    and every /ai-spend/* endpoint that touches MySQL returned 500.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • fix(migrations): end cipx config/plan migrations with a trailing blank line

    migrations.md requires every Liquibase migration to end with an empty line.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    下载附件