Skip to content

Fix retired model, close debug routes, add tests, CI and an honest README - #1

Merged
dpelezo merged 11 commits into
masterfrom
fix/portfolio-polish
Nov 23, 2026
Merged

dpelezo merged 11 commits into
masterfrom
fix/portfolio-polish

Conversation

@dpelezo

@dpelezo dpelezo commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Summary

Gets the API back to a working, honest state before it is shared with recruiters: a current Claude model, closed debug routes, a test suite that runs, CI, a license and a README that matches the code.

Changes

  • Model: the default was claude-3-5-sonnet-20240620, retired in October 2025, and MODEL_NAME/TEMPERATURE were ignored. The API now reads LLM_MODEL (default claude-haiku-5-5) and LLM_TEMPERATURE, and .env.example and docker-compose.yml use those names.
  • Security: every /debug route returns 404 unless DEBUG=true, and CORS uses BACKEND_CORS_ORIGINS instead of *.
  • Tests: replaced the stale suite, which could not import, with 12 offline tests. A fake LangGraph graph and a fake LangSmith client mean no test calls a live API.
  • CI: Ruff 0.17.6 and pytest on Python 3.11, on every push and PR.
  • Logging: broad except blocks now log full tracebacks with logger.exception, and the forced DEBUG log level is gone.
  • LangSmith: the run helper called client.run_create/run_update, which do not exist. It now uses create_run/update_run and does nothing when tracing is off.
  • Repo hygiene: .gitignore, removed committed .pyc files, MIT LICENSE (copied from the main branch), Ruff config.
  • Docs: rewritten README (demo link, CI badge, architecture, test coverage, known limitations, real endpoint list) and a new docs/langsmith-guide.md.

Verification

  • ruff check app tests: passes
  • pytest -q on Python 3.11: 12 passed
  • Every endpoint in the README was checked against app.routes

Known issue, not fixed here

Saving threads to the LangGraph checkpointer fails with KeyError: 'checkpoint_ns'. Threads stay in memory only. This is listed under "Known limitations" in the README and needs its own PR.

Before you merge: Vercel settings for the API project

  • ANTHROPIC_API_KEY and EXA_API_KEY are set and valid
  • BACKEND_CORS_ORIGINS=["https://ai-assistant-frontend-beta.vercel.app"]
  • DEBUG=false
  • SECRET_KEY is set to a random value
  • Optional: LLM_MODEL (defaults to claude-haiku-5-5)

After merging

  • Redeploy on Vercel, then send a test message from the live front end
  • Delete the stray main branch (it only holds the LICENSE, now on master)

Generated by Claude Code

dpelezo and others added 11 commits November 23, 2026 10:48
…s off

The helper called client.run_create and client.run_update, which do not
exist, so every manual run failed. It now only runs when LangSmith is
configured.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XtW6Y5JF5GNt1txL7PriFg
The settings class reads LLM_MODEL and LLM_TEMPERATURE, so MODEL_NAME and
TEMPERATURE were silently ignored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XtW6Y5JF5GNt1txL7PriFg
Adds the demo link, CI badge, architecture, what the tests cover, known
limitations and the real endpoint list, and removes claims the code did
not support.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XtW6Y5JF5GNt1txL7PriFg
@vercel

vercel Bot commented Nov 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ai-assistant-api Ready Ready Preview Nov 23, 2026 6:01pm UTC

@dpelezo
dpelezo merged commit 9e77776 into master Nov 23, 2026
4 checks passed
@dpelezo
dpelezo deleted the fix/portfolio-polish branch November 23, 2026 21:45

This branch was successfully deployed

1 active deployment
Preview — 90f2b40f Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant