Skip to content

Conversations filter: local /v1/conversations endpoints #623

Description

@leseb

Parent

Part 2 of #602. Depends on #622.

Description

Implement the openai_conversations filter that handles all 8 /v1/conversations endpoints locally via FilterAction::Reject, backed by the store layer from #622.

Scope

  • ConversationsConfig with self-contained database config (backend, database_url, table names, SSL)
  • OpenaiConversationsFilter with lazy OnceCell store init, path matching, lifecycle dispatch
  • 8 handler functions: create/get/update/delete conversation, create/list/get/delete items
  • Metadata validation (max 16 keys, key ≤ 64 bytes, string values ≤ 512 bytes)
  • Cursor-based pagination for item listing (after, limit 1–100, order asc/desc)
  • Register openai_conversations in FilterRegistry
  • Module exports through openai/mod.rsai/mod.rsbuiltins/mod.rs
  • Example config: examples/configs/ai/openai/conversations/conversations.yaml
  • Integration tests covering all 8 endpoints + error cases
  • cargo xtask sync-example-readme --fix

Acceptance Criteria

  • All 8 endpoints return correct JSON shapes (conversation object, list, deleted, error)
  • 404 for missing/wrong-tenant resources
  • Requests never forwarded upstream
  • make lint and make test-integration clean
  • Example config parses and works end-to-end

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