Skip to content

Conversation

Michael-A-Kuykendall
Copy link
Owner

Summary

  • Add optional OpenAI-standard fields to Model struct: permission, root, parent
  • Use skip_serializing_if to omit null fields for cleaner JSON responses
  • Populate root field with model name for standard OpenAI compatibility
  • Improves compatibility with frontend tools that expect full OpenAI API format

Changes

  • Enhanced Model struct with optional OpenAI-standard fields
  • Updated model creation to populate root field appropriately
  • Added comprehensive test coverage for enhanced Model structure
  • Used serde attributes to maintain clean JSON output

Test Coverage

  • ✅ Enhanced Model structure serializes correctly with new fields
  • ✅ Optional fields are omitted when None (skip_serializing_if)
  • ✅ Root field is properly populated with model name
  • ✅ ModelsResponse maintains compatibility with existing tests
  • ✅ All regression tests pass with updated Model structure

Issue Resolution

Fixes Issue #113: OpenAI API compatibility for frontends

This enhancement makes shimmy more compatible with frontend tools and applications that expect the full OpenAI API model response format, including the optional fields like permission, root, and parent that some tools rely on for proper functionality.

🤖 Generated with Claude Code

…Issue #113)

- Add optional OpenAI-standard fields to Model struct: permission, root, parent
- Use skip_serializing_if to omit null fields for cleaner JSON responses
- Populate root field with model name for standard OpenAI compatibility
- Update regression tests to verify enhanced Model structure
- Improves compatibility with frontend tools that expect full OpenAI API format

Resolves Issue #113: OpenAI API compatibility for frontends

Signed-off-by: Michael A. Kuykendall <[email protected]>
@Michael-A-Kuykendall Michael-A-Kuykendall merged commit 37f67ac into main Oct 13, 2025
5 of 9 checks passed
@Michael-A-Kuykendall Michael-A-Kuykendall deleted the clean/issue-113-openai-compatibility branch October 13, 2025 15:29
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.

1 participant