Repository navigation
feat: add Straitly to the built-in provider catalog - #5008
HashimSyedUBC wants to merge 2 commits into
Conversation
Signed-off-by: Hashim Syed <112725957+HashimSyedUBC@users.noreply.github.com>
aheritier
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
[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.
There was a problem hiding this comment.
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>
Summary
Adds Straitly to the embedded provider catalog, following the contributor guide and the shape of #4912 (HopBase):
pkg/model/provider/catalog/providers.json: astraitlyentry using the existing OpenAI implementation (api_type: openai, base URLhttps://api.straitly.ai/v1,STRAITLY_API_KEY, default modeldeepseek/deepseek-v4-1-flash,merge_consecutive_messageslike the other multi-model hosts). It sits afterhopbase, so it ranks low for automatic selection.openAIAliasProviders(hermetic request test, plus the opt-in live test behindDOCKER_AGENT_RUN_STRAITLY_LIVE_TEST), rows in the auto-selection tables, ashouldMergeConsecutiveMessagesrow, and the models.dev exemptions inTestProviderIDsMatchEmbeddedCatalogandmodelsDevAbsentProviders. Straitly isn't in the models.dev snapshot, the same situation ashopbaseandpopnow.docs/configuration/modelsand the schema description, and anexamples/straitly.yamlrecipe.Straitly is an AI gateway: one OpenAI-compatible API key for more than 150 models, including Claude, GPT, Gemini, Grok and DeepSeek.
GET /v1/modelslists the model IDs withcontext_length,supported_parametersand input modalities. Model IDs usually contain a slash (deepseek/deepseek-v4-1-flash), sostraitly/deepseek/deepseek-v4-1-flashrelies on the existing first-slash split.No live
/v1/modelsdiscovery is added:straitlyis not inliveFetchProviders, sodocker agent modelslists only the default.Testing
Based on
mainat 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.testloaded: pass.go test ./pkg/runtime/modelcatalog/... ./cmd/...: pass.DOCKER_AGENT_RUN_STRAITLY_LIVE_TEST=1 go test -count=1 ./pkg/model/provider -run 'TestOpenAIAliasProvider_LiveAPI$/straitly'with a realSTRAITLY_API_KEY: pass (straitly live response: "pong").docker-agent run straitly.yaml --exec --safety restricted "Read note.txt with the read file tool and tell me its exact contents."usingexamples/straitly.yamlcalledread_fileand returned the file contents.golangci-lintlocally.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.