Skip to content

v1.9.0 — Per-user Gemini API key (Telegram fallback intact)

Choose a tag to compare

@Gonzalez8 Gonzalez8 released this 22 May 17:43
· 42 commits to main since this release

Add your own Gemini key, get hands-free fichaje

CheckTime now reads each user's optional Google Gemini API key from
the profile page and uses it to solve the CheckJC verification
captcha automatically. The Telegram human flow that works today is
unchanged
— it stays as the safety net for users without a key and
for any LLM failure.

How it works

HybridCaptchaSolver is what the scheduler uses:

  1. Has the user a google_api_key? → call LLMVisionSolver (Gemini).
  2. Did Gemini return a usable 6-letter sequence? → done.
  3. Otherwise (no key, or LLM error / timeout / bad reply) →
    TelegramHumanSolver takes over and the user gets the same image
    on Telegram they got in v1.8.x.

Same CaptchaSolver.solve() contract for both implementations, same
composite image, same parsing helpers. The change is purely additive.

Profile setup (one-time, per user)

  1. Open https://aistudio.google.com/app/apikey, sign in, click
    Create API key.
  2. In CheckTime go to Profile → API Key de Google and paste it.

The key is stored encrypted at rest (same crypto as the CheckJC
password). Clear it any time with the Remove API key button.

Migration

  • New column user.google_api_key VARCHAR(512) added automatically
    on startup (ADD COLUMN IF NOT EXISTS).
  • No new env vars.
  • No changes to existing CheckJC / Telegram flows.

Image

ghcr.io/gonzalez8/checktime:1.9.0 / :1.9 / :latest

Upgrade

sed -i 's/^CHECK_TIME_VERSION=.*/CHECK_TIME_VERSION=1.9.0/' stack.env
docker compose pull app
docker compose up -d app

Logs you'll see when it works

Login successful for ... landed at .../portal/employee/verification
LLM solved captcha for user Jose on attempt 1 via gemini-2.0-flash
Submitting captcha for Jose (attempt 1): letters [A, P, ...]
Captcha cleared for Jose on attempt 1, landed at .../portal/employee
Check in completed successfully for user Jose.

Logs you'll see when it falls back

Login successful for ... landed at .../portal/employee/verification
LLM solver failed for user Jose; falling back to Telegram human
Telegram captcha relay started for user Jose (row=NN, attempt=1, ttl=300s)
... [user replies on Telegram] ...
Captcha reply recorded for user Jose (row=NN): 4036572918198142

Full design rationale in docs/migrations/captcha-relay.md.