-
Notifications
You must be signed in to change notification settings - Fork 72
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
“Log probs not found” error with some models on openrouter #119
Comments
@jamesrochabrun FWIW I sidestep this in AIProxySwift by making (mostly) all decodable properties optional. Here's the snippet in my contribution guide justifying this somewhat unconventional approach:
Sometimes I don't follow my own guidance, when I decide "if the provider doesn't return this field then the response is useless". But sticking to it as much as possible has reduced some headaches for me (even though it makes the callsite more annoying because the caller has to unwrap the optional for any property they are interested in). |
+1 I don't mind unwrapping what I need. |
Another user report for a field that didn't show up on some providers. -- |
Thanks @lzell for the suggestion, I think this is the only option to make a package friendly for different providers https://github.com/jamesrochabrun/SwiftOpenAI/releases/tag/v4.0.3 |
A user using this model “deepseek r1:free” noticed this missing json field.
It would be good to make most fields that are not standard optional to ensure that they don’t lead to decoding errors like this. It seems like there’s a huge variety in what gets sent over openrouter.
The text was updated successfully, but these errors were encountered: