Skip to content

chore: align SDK with server #218 (max_completion_tokens + models)#15

Closed
Abhinavexist wants to merge 1 commit into
mainfrom
chore/align-server-218
Closed

chore: align SDK with server #218 (max_completion_tokens + models)#15
Abhinavexist wants to merge 1 commit into
mainfrom
chore/align-server-218

Conversation

@Abhinavexist

Copy link
Copy Markdown
Collaborator

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_tokens as an alias for max_tokens (explicit max_tokens still wins). The README "Good to know" bullet said "Use max_tokens (not max_completion_tokens) to bound output" — now stale. Updated to: both bound output, max_tokens wins if both set.

No code change needed — the core SDK passes params straight through, and ChatInterfaze (#12) inherits ChatOpenAI's max_tokensmax_completion_tokens rename, which stops being a silent no-op post-#218 (that PR's known-limitation note is now moot).

Models endpoints

#218 gives GET /v1/models the OpenAI envelope (object/owned_by) and adds GET /v1/models/{id} (previously an HTML 404). Added tests/test_models.py locking in the SDK's models surface against the #218-shaped responses:

  • models.list() → parses, owned_by populated.
  • models.retrieve("interfaze-beta") → returns the model (raised NotFoundError on the old HTML 404).
  • models.retrieve("nope")NotFoundError on the spec-shaped model_not_found 404.

These are deploy-independent (mocked). Live QA against a deployed server can confirm end-to-end.

Suite: 27 passing; ruff + mypy --strict clean.

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.
@Abhinavexist

Copy link
Copy Markdown
Collaborator Author

Superseded by #16, which consolidates the #218 spec-compat reconciliation (this alignment + the streaming fence fix).

@Abhinavexist
Abhinavexist deleted the chore/align-server-218 branch July 25, 2026 09:20
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.

SDK follow-ups when server PR interfaze#218 (OpenAI spec-compat) deploys

1 participant