chore: align SDK with server #218 (max_completion_tokens + models)#15
Closed
Abhinavexist wants to merge 1 commit into
Closed
chore: align SDK with server #218 (max_completion_tokens + models)#15Abhinavexist wants to merge 1 commit into
Abhinavexist wants to merge 1 commit into
Conversation
Server PR interfaze#218 (OpenAI 1:1 spec-compat) is deploying:
- max_completion_tokens is now honored as an alias for max_tokens
(max_tokens still wins), so drop the README guidance that said to
avoid it.
- GET /v1/models is OpenAI-enveloped and GET /v1/models/{id} now exists;
add mocked tests locking in models.list()/retrieve() including the
spec-shaped model_not_found 404.
Collaborator
Author
|
Superseded by #16, which consolidates the #218 spec-compat reconciliation (this alignment + the streaming fence fix). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14
Server PR InterfazeAI/interfaze#218 (OpenAI 1:1 spec-compat) is deploying, so the previously deploy-gated items are now actioned.
max_completion_tokens#218 honors
max_completion_tokensas an alias formax_tokens(explicitmax_tokensstill wins). The README "Good to know" bullet said "Usemax_tokens(notmax_completion_tokens) to bound output" — now stale. Updated to: both bound output,max_tokenswins if both set.No code change needed — the core SDK passes params straight through, and
ChatInterfaze(#12) inheritsChatOpenAI'smax_tokens→max_completion_tokensrename, which stops being a silent no-op post-#218 (that PR's known-limitation note is now moot).Models endpoints
#218 gives
GET /v1/modelsthe OpenAI envelope (object/owned_by) and addsGET /v1/models/{id}(previously an HTML 404). Addedtests/test_models.pylocking in the SDK's models surface against the #218-shaped responses:models.list()→ parses,owned_bypopulated.models.retrieve("interfaze-beta")→ returns the model (raisedNotFoundErroron the old HTML 404).models.retrieve("nope")→NotFoundErroron the spec-shapedmodel_not_found404.These are deploy-independent (mocked). Live QA against a deployed server can confirm end-to-end.
Suite: 27 passing;
ruff+mypy --strictclean.