Skip to content

[TASK] (llm): setup lightweight OpenRouter client with structured outputs #27

@MikeNovikoff

Description

@MikeNovikoff

Description

LangChain introduces unnecessary overhead for direct text-to-JSON generation. We will use the native openai package patched with instructor to enforce strict Pydantic schemas via OpenRouter

To do

  • Install dependencies: openai, instructor, pydantic, python-dotenv
  • Setup .env and .env.example
  • Create core/llm_client.py using instructor.patch(OpenAI(base_url="https://openrouter.ai/api/v1"))
  • Add a basic ping_llm healthcheck script.

Notes

Acceptance Criteria

  • Client returns a validated Pydantic model on a dummy prompt, not just a raw string

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Task.

Projects

Status
In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions