Skip to content

Decode vector store file response fields from snake_case - #205

Open
jihtsan wants to merge 1 commit into
jamesrochabrun:mainfrom
jihtsan:codex/100-decode-vector-store-file-fields
Open

jihtsan wants to merge 1 commit into
jamesrochabrun:mainfrom
jihtsan:codex/100-decode-vector-store-file-fields

Conversation

@jihtsan

@jihtsan jihtsan commented Nov 2, 2026

Copy link
Copy Markdown

Fixes #100.

VectorStoreFileObject had no CodingKeys, so a valid vector-store file response failed at usageBytes and could not be read by the default service. Map usage_bytes, created_at, vector_store_id and last_error together, preserving required fields, zero usage and nullable errors. No global decoder strategy or fallback defaults change.

Validation:

  • Before the fix, 4 of 5 new XCTest methods fail on official snake_case fixtures; the strictness control passes.
  • swift test --force-resolved-versions: 114 tests, 0 failures. Tests cover DTO decoding plus create, retrieve, list and batch-list through OpenAIServiceFactory's default decoder and an in-memory HTTPClient. Zero/nonzero usage, null/missing/non-null errors, and required/malformed fields are covered.
  • swift build --force-resolved-versions: passes on macOS arm64, Swift6.4 with the tracked resolved versions.
  • SwiftFormat0.64.5 configured lint passes for both changed files. Full repository lint has 12 findings in 3 unrelated files, identical to a fresh archived unchanged-base lint; full lint is not green and no unrelated formatting is included.
  • Independent Standards/Spec reviews at 21b0882 have no remaining findings. A separate complete-module public API probe passes 36 assertions.

Linux Swift6.0.1/6.2, iOS, hosted CI and actual PDF upload/provider processing were not tested. Fixtures require no credentials or real endpoint.

AI assistance: OpenAI Codex researched, implemented, tested and independently reviewed this fix.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T08:21:56.023091Z 21b0882 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

Key 'usageBytes' not found

1 participant