Skip to content

Fix array_merge() fatal error with string payloads in ModelClient imp… #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RamyHakam
Copy link
Contributor

…lementations

Q A
Bug fix? yes
New feature? no
Docs? no
Issues Fix #326
License MIT

Issue
The ModelClientInterface allows array|string $payload, but all implementations use array_merge($payload, $options) without type checking, causing fatal errors when string payloads are passed.

Fix
Remove unnecessary string support from the interface since all implementations expect arrays:

@carsonbot carsonbot added Bug Something isn't working Status: Needs Review labels Aug 18, 2025
@carsonbot carsonbot changed the title Fix array_merge() fatal error with string payloads in ModelClient imp… Fix array_merge() fatal error with string payloads in ModelClient imp… Aug 18, 2025
@chr-hertel
Copy link
Member

This breaks some huggingface examples, and embeddings - for example for openai.

Let's discuss in #326 first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Platform] Fatal Error: array_merge() called with string payload in ModelClient implementations
3 participants