Spaces:
Running
Running
Update app.py
Browse files40 unmodified lines4142434445464748495040 unmodified lineslogger = logging.getLogger(__name__)# ββ Constants ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββMODEL = "gpt-4o-mini" # primary model β journal analysis, chat, repo finderMODEL_LIGHT = "gpt-4.1-nano" # lightweight calls β subject normalise, cover letter# Tier 4 limits: gpt-4o-mini = 10M TPM, gpt-4.1-nano = 10M TPM β both very high# The 429s were caused by $10 monthly spend cap, not rate limits# ββ KU APC agreement publishers (Option B: publisher + top 15% check) ββββββββ# KU has agreements with 6 publishers. Badge shown if publisher matches AND40 unmodified lines41424344454647484950515240 unmodified lineslogger = logging.getLogger(__name__)# ββ Constants ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# Model routing β all separate quota buckets at Tier 4MODEL = "gpt-4.1-mini" # journal analysis, chat, repo finder β 10M TPM, Tier 4MODEL_LIGHT = "gpt-4.1-nano" # subject browse, cover letter, license β 10M TPM, Tier 4# gpt-4.1-mini: $0.04/1M input (4x cheaper than gpt-4o-mini, same quality for JSON tasks)# gpt-4.1-nano: $0.01/1M input (ultra-cheap for simple normalisation calls)# Both have completely separate quota from gpt-4o-mini# ββ KU APC agreement publishers (Option B: publisher + top 15% check) ββββββββ# KU has agreements with 6 publishers. Badge shown if publisher matches AND
app.py+6-4