Skip to content

LCORE-3574: Added custom serializer - #2454

Merged
tisnik merged 1 commit into
lightspeed-core:feature/upgrade-ogx-to-1.2.xfrom
asimurka:feature/custom-serializer
Aug 20, 2026
Merged

LCORE-3574: Added custom serializer#2454
tisnik merged 1 commit into
lightspeed-core:feature/upgrade-ogx-to-1.2.xfrom
asimurka:feature/custom-serializer

Conversation

@asimurka

@asimurka asimurka commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds dump_ogx_model() via ApiClient.sanitize_for_serialization() so OGX responses and streaming chunks serialize correctly through nested OneOf fields that plain model_dump() leaves empty. The responses, prompts, and providers endpoints now use this helper instead of calling model_dump() directly on ogx_client models.

Integration tests build real OpenAIResponseObject instances instead of mocks. Unit tests patch dump_ogx_model with explicit serialized payloads where mocks are still used. Serialization behavior is covered by new tests in test_ogx_serialization.py.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library [pyproject.toml + uv.lock]
  • Bump-up dependent library [requirements.*.txt for Konflux]
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: Cursor

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 07e04f06-2151-463f-9bc3-550f22cf68bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@asimurka
asimurka force-pushed the feature/custom-serializer branch 3 times, most recently from 50c8283 to 9392cb1 Compare August 18, 2026 10:53
Co-authored-by: Cursor <cursoragent@cursor.com>
@asimurka
asimurka force-pushed the feature/custom-serializer branch from 9392cb1 to 3e05207 Compare August 18, 2026 11:51

@tisnik tisnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisnik
tisnik merged commit 3e0d38d into lightspeed-core:feature/upgrade-ogx-to-1.2.x Aug 20, 2026
31 of 38 checks passed
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.

2 participants