SwiftOpenAI icon indicating copy to clipboard operation
SwiftOpenAI copied to clipboard

Add new gpt-4.1-nano model

Open gah020 opened this issue 11 months ago • 1 comments

We should add the new gpt-4.1-nano model for usage: https://platform.openai.com/docs/models/gpt-4.1-nano

gah020 avatar May 05 '25 04:05 gah020

Yes! would you mind opening a PR for it? It is not scalable to add a new release for every model released, models are released weekly! to solve that you can use the .custom option https://github.com/jamesrochabrun/SwiftOpenAI/blob/main/Sources/OpenAI/Public/Parameters/Model.swift#L74

like this:

model: .custom("YOUR_MODEL_NAME")

:)

jamesrochabrun avatar May 05 '25 17:05 jamesrochabrun

That makes sense. And yes, I can open a PR for it this weekend. Thanks!

gah020 avatar May 06 '25 23:05 gah020