Skip to content

feat: add Straitly to the built-in provider catalog - #5008

Open
HashimSyedUBC wants to merge 2 commits into
docker:mainfrom
HashimSyedUBC:add-straitly-provider-signed
Open

HashimSyedUBC wants to merge 2 commits into
docker:mainfrom
HashimSyedUBC:add-straitly-provider-signed

Conversation

@HashimSyedUBC

Copy link
Copy Markdown

Summary

Adds Straitly to the embedded provider catalog, following the contributor guide and the shape of #4912 (HopBase):

  • pkg/model/provider/catalog/providers.json: a straitly entry using the existing OpenAI implementation (api_type: openai, base URL https://api.straitly.ai/v1, STRAITLY_API_KEY, default model deepseek/deepseek-v4-1-flash, merge_consecutive_messages like the other multi-model hosts). It sits after hopbase, so it ranks low for automatic selection.
  • Tests: a row in openAIAliasProviders (hermetic request test, plus the opt-in live test behind DOCKER_AGENT_RUN_STRAITLY_LIVE_TEST), rows in the auto-selection tables, a shouldMergeConsecutiveMessages row, and the models.dev exemptions in TestProviderIDsMatchEmbeddedCatalog and modelsDevAbsentProviders. Straitly isn't in the models.dev snapshot, the same situation as hopbase and popnow.
  • Docs: a provider page, a nav entry, a row in the provider credentials table, the provider lists in docs/configuration/models and the schema description, and an examples/straitly.yaml recipe.

Straitly is an AI gateway: one OpenAI-compatible API key for more than 150 models, including Claude, GPT, Gemini, Grok and DeepSeek. GET /v1/models lists the model IDs with context_length, supported_parameters and input modalities. Model IDs usually contain a slash (deepseek/deepseek-v4-1-flash), so straitly/deepseek/deepseek-v4-1-flash relies on the existing first-slash split.

No live /v1/models discovery is added: straitly is not in liveFetchProviders, so docker agent models lists only the default.

Testing

Based on main at 2dec9aa, Go 1.27.4, darwin/arm64:

  • gofmt -l pkg cmd: clean. go build ./...: ok.
  • go test -count=1 ./pkg/model/provider/... ./pkg/config/... with .env.test loaded: pass. go test ./pkg/runtime/modelcatalog/... ./cmd/...: pass.
  • Live, 2026-11-22: DOCKER_AGENT_RUN_STRAITLY_LIVE_TEST=1 go test -count=1 ./pkg/model/provider -run 'TestOpenAIAliasProvider_LiveAPI$/straitly' with a real STRAITLY_API_KEY: pass (straitly live response: "pong").
  • Live tool call, 2026-11-22: docker-agent run straitly.yaml --exec --safety restricted "Read note.txt with the read file tool and tell me its exact contents." using examples/straitly.yaml called read_file and returned the file contents.
  • I did not run golangci-lint locally.

The commit is signed off (DCO) and carries a GitHub-verified signature. It was created through GitHub's API, so the signature is GitHub's own; if you need one from a personal key instead, say so and I will redo it.

Disclosure: I work on Straitly. This PR was prepared with AI assistance.

Signed-off-by: Hashim Syed <112725957+HashimSyedUBC@users.noreply.github.com>
@HashimSyedUBC
HashimSyedUBC requested a review from a team as a code owner November 23, 2026 06:09
@aheritier aheritier added area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Nov 23, 2026

@aheritier aheritier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding Straitly. The catalog entry reuses the existing OpenAI client, and the tests cover credential selection, the default model, and sending slash-containing model IDs unchanged. The docs show how to find additional models without adding live discovery to the CLI.

},
{
"name": "straitly",
"merge_consecutive_messages": true,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[should-fix] Please run the contributor guide’s message-merging probe against Straitly’s default model and record the scoped result before enabling this flag. It coalesces adjacent user messages as well as system messages. The live pong test sends only one user message, and the tool-call smoke test runs with merging already enabled, so neither compares preserved and merged message boundaries.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. I ran the message-merging probe on the default model (straitly/deepseek/deepseek-v4-1-flash) at 00e1363:

Scenario preserve merge_system_user Notes
control 200, accepted, markers_ok: true 200, accepted, markers_ok: true in/out tokens 42/24 vs 51/92
multi_system 200, accepted, markers_ok: true 200, accepted, markers_ok: true in/out tokens 76/48 vs 76/50
consecutive_user 200, accepted, markers_ok: true 200, accepted, markers_ok: true in/out tokens 65/67 vs 65/66
late_system 200, accepted, markers_ok: true 200, accepted, markers_ok: true in/out tokens 77/76 vs 66/154

Because preserve passed all four scenarios cleanly, I removed merge_consecutive_messages: true from the straitly entry in pkg/model/provider/catalog/providers.json in 00e1363, updated the straitly rows in pkg/model/provider/openai/system_message_merge_test.go and pkg/model/provider/openai_alias_providers_test.go, and removed the merging paragraph from docs/providers/straitly/index.md. Hermetic tests and TestMessageMergeLive pass on the updated head.

Signed-off-by: Hashim Syed <112725957+HashimSyedUBC@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants