fleet-memory/hindsight-api/hindsight_api
Nicolò Boschi 539190b69e
feat: support for codex and claude-code as llm (#276)
* feat: support for codex and claude-code as llm

* Remove refactoring plan file

* Consolidate Anthropic tests into main LLM provider test suite

- Add Anthropic models (Sonnet, Opus, Haiku) to MODEL_MATRIX
- Remove separate test_anthropic_provider.py file
- All Anthropic models now tested with standard memory operations

* Add provider-specific default models

Each LLM provider now has a sensible default model that's used when
HINDSIGHT_API_LLM_MODEL is not explicitly set. This simplifies
configuration - users can specify just the provider and API key.

Changes:
- Add PROVIDER_DEFAULT_MODELS mapping in config.py
- Update config logic to use provider defaults for both global and
  per-operation LLM configs
- Add comprehensive tests for provider default model selection
- Document provider defaults in models.md

Example usage:
  export HINDSIGHT_API_LLM_PROVIDER=anthropic
  export HINDSIGHT_API_LLM_API_KEY=sk-ant-xxx
  # Automatically uses claude-sonnet-4-20250514

Provider defaults:
  - openai: gpt-5-mini
  - anthropic: claude-sonnet-4-20250514
  - gemini: gemini-2.5-flash
  - groq: openai/gpt-oss-120b
  - ollama: gemma3:12b
  - lmstudio: local-model
  - vertexai: gemini-2.0-flash-001
  - openai-codex: o3-mini
  - claude-code: claude-sonnet-4-20250514
  - mock: mock-model

* Update provider default models

- openai: gpt-5-mini -> o3-mini
- anthropic: claude-sonnet-4-20250514 -> claude-haiku-4-5-20251001
- openai-codex: o3-mini -> gpt-5.2-codex
- claude-code: claude-sonnet-4-20250514 -> claude-sonnet-4-5-20250929

Updated tests and documentation to reflect new defaults.

* Move OpenAI Codex and Claude Code setup to models.md

Moved detailed setup instructions for OpenAI Codex and Claude Code from
configuration.md to models.md where they better fit with model-specific
documentation.

Changes:
- Move "OpenAI Codex Setup" section from configuration.md to models.md
- Move "Claude Code Setup" section from configuration.md to models.md
- Add cross-reference tip in configuration.md pointing to models.md
- Update default model in Claude Code example to claude-sonnet-4-5-20250929
- Keep basic provider examples in configuration.md for quick reference

This makes the configuration.md page more focused on environment
variables while models.md contains provider-specific setup details.
2026-02-02 12:54:44 +01:00
..
admin feat: new 'worker' service (#176) 2026-01-20 10:17:56 +01:00
alembic fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
api Add MentalModelRefreshContext and pre-operation validation for mental model create/refresh (#271) 2026-02-01 16:16:20 -05:00
engine feat: support for codex and claude-code as llm (#276) 2026-02-02 12:54:44 +01:00
extensions Add MentalModelRefreshContext and pre-operation validation for mental model create/refresh (#271) 2026-02-01 16:16:20 -05:00
worker fix: worker doesn't pick up correct default schema (#259) 2026-01-31 09:15:59 +01:00
__init__.py Release v0.4.7 2026-01-31 18:40:32 +01:00
banner.py feat: print version during startup (#275) 2026-02-02 12:40:45 +01:00
config.py feat: support for codex and claude-code as llm (#276) 2026-02-02 12:54:44 +01:00
daemon.py feat(hindsight-embed): external API support + OpenClaw fixes (#263, #264) (#265) 2026-01-31 17:02:13 +01:00
main.py feat: print version during startup (#275) 2026-02-02 12:40:45 +01:00
mcp_local.py feat(mcp): add timestamp to retain (#190) 2026-01-23 16:00:43 +01:00
mcp_tools.py feat(mcp): add Bearer token authentication and tenant auth propagation (#241) 2026-01-30 09:08:18 +01:00
metrics.py chore: remove dead code (#245) 2026-01-30 09:16:32 +01:00
migrations.py fix: batch queries on recall (#149) 2026-01-13 13:20:22 +01:00
models.py chore: drop unused access_count column (#178) 2026-01-20 10:36:02 +01:00
pg0.py feat: support vertex as llm provider (#233) 2026-01-29 16:13:57 -05:00
server.py Fix: Load extensions in server.py for multi-worker deployments (#155) 2026-01-13 17:55:33 +01:00