Skip to content

Add get_model_catalog to Rust SDK - #852

Merged
AnthonyRonning merged 1 commit into
MaplePrivacyLabs:masterfrom
benthecarman:codex-rust-sdk-model-catalog
Aug 26, 2026
Merged

AnthonyRonning merged 1 commit into
MaplePrivacyLabs:masterfrom
benthecarman:codex-rust-sdk-model-catalog

Conversation

@benthecarman

Copy link
Copy Markdown
Contributor

Summary

  • Expose GET /v1/models/catalog through OpenSecretClient as get_model_catalog(), returning the new ModelCatalogResponse (data with context_window/max_context_tokens/capabilities, aliases with target_model, defaults).
  • The TypeScript SDK already fetches this endpoint (fetchModelCatalog); the Rust SDK only allowed it through the inference proxy allow-list, so native consumers had no way to size context usage against the selected model.
  • Adds test_get_model_catalog mirroring test_get_models.

Test plan

  • cargo test --lib (82 passed)
  • Live probe against enclave.trymaple.ai: catalog returns 7 models with context windows, 2 aliases (auto:quick -> deepseek-v4-flash, auto:powerful -> kimi-k2-6), and defaults.
  • CI integration test run

@AnthonyRonning

Copy link
Copy Markdown
Contributor

Could you rebase? I think this was after some of our SDK work but just need to double check. I’m now running CICD tests against an opensecret server that gets pulled in, so you may add integration tests there for good measure if you haven’t already.

@AnthonyRonning

Copy link
Copy Markdown
Contributor

Looks good overall. Before merging:

  • Please align Rust capabilities with the server/TypeScript contract: chat, vision, reasoning, and tool_use (not audio/video).
  • Remove the duplicated models.data.is_empty() assertion.
  • Rebase onto current master and let the fresh SDK + desktop CI pass.

@benthecarman
benthecarman force-pushed the codex-rust-sdk-model-catalog branch from 427b694 to 8db806d Compare August 26, 2026 20:57
Expose GET /v1/models/catalog through OpenSecretClient. The
TypeScript SDK already fetches this endpoint (fetchModelCatalog);
the Rust SDK only allowed it through the inference proxy. The
catalog carries each model's context window and capabilities,
which clients need to size context usage against the selected
model instead of a hardcoded fallback.
@benthecarman
benthecarman force-pushed the codex-rust-sdk-model-catalog branch from 877e5fb to eb3137d Compare August 26, 2026 21:04
@benthecarman

Copy link
Copy Markdown
Contributor Author

Looks good overall. Before merging:

* Please align Rust capabilities with the server/TypeScript contract: `chat`, `vision`, `reasoning`, and `tool_use` (not `audio`/`video`).

* Remove the duplicated `models.data.is_empty()` assertion.

* Rebase onto current `master` and let the fresh SDK + desktop CI pass.

done

@AnthonyRonning
AnthonyRonning merged commit 0d08b06 into MaplePrivacyLabs:master Aug 26, 2026
19 checks passed
@MaplePrivacyLabs MaplePrivacyLabs deleted a comment from marshalokos Aug 27, 2026
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.

2 participants