Commit c3fc44d
fix: polish Altimate connect dialog — default URL, rename labels, fix placeholder (#724)
* fix: polish Altimate connect dialog — default URL, rename labels, fix placeholder
- parseAltimateKey now accepts `instance-name::api-key` (URL defaults to
https://api.myaltimate.com); `api-url::instance-name::api-key` still
works for custom/self-hosted instances.
- Provider display name: "Altimate" → "Altimate AI".
- Default model display name: "Altimate AI" → "Altimate LLM Gateway".
- TUI input placeholder for altimate-backend changed from "API key" to
"instance-name::api-key" so it matches the expected format.
- Dialog copy, example, and validation error message updated to reflect
the new default-URL form with custom-URL fallback.
- Docs (docs/docs/getting-started.md) and tests updated accordingly.
Internal IDs (`altimate-backend`, `altimate-default`) are intentionally
left unchanged to preserve auth-store / config compatibility.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor: parseAltimateKey uses part-count, not URL sniffing
Drop the `://` heuristic for detecting whether the user supplied an
API URL. Rule is now purely positional:
- split("::").length == 2 → URL omitted → default to
https://api.myaltimate.com
- length >= 3 → first segment IS the URL; validated as http(s)://
This matches the mental model "if split on :: gives 2, no URL".
It also means a 2-part API key cannot contain `::`; that's an
acceptable trade-off because Altimate keys don't use `::`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor: rename model ID altimate-default → altimate-llm-gateway
The display name is already "Altimate LLM Gateway" — the ID should
match instead of staying as the opaque "altimate-default".
Touched:
- packages/opencode/src/provider/provider.ts (model registration +
default-selection + log message)
- packages/opencode/src/acp/agent.ts (default-selection)
- packages/opencode/test/provider/provider.test.ts (assertions)
- packages/opencode/test/skill/release-v0.5.20-adversarial.test.ts
(parseModel test fixture)
- docs/docs/configure/providers.md (tip text)
Provider ID `altimate-backend` intentionally left alone — that one is
an auth-storage / credential-file boundary and renaming it has a much
larger blast radius. CHANGELOG.md left alone — historical record.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: say 'select Altimate AI' to match renamed provider display
Addresses review feedback from Copilot and cubic-dev-ai: the
getting-started guide instructed users to select **Altimate** in the
/connect TUI, but the provider display name is now **Altimate AI**.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: add JSDoc to parseAltimateKey describing the two accepted formats
Addresses Coderabbit pre-merge docstring-coverage check by documenting
the 2-part (default URL) vs 3+ part (custom URL) behavior of
parseAltimateKey.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: revert model ID rename (backward-compat) + resolve review comments
Addresses two review findings:
1. cubic P1 — renaming the internal model ID from `altimate-default` to
`altimate-llm-gateway` broke backward compatibility. Opencode
persists selected model IDs to `model.json` (favorites, recents,
variants) and users can pin `model: altimate-backend/altimate-default`
in their opencode.json. After the rename those references would
silently go stale. Keep the ID as `altimate-default`; the polish the
user actually wanted was the display name, which stays as
"Altimate LLM Gateway". Added a comment explaining why the ID is
preserved. Rephrased the auto-selection tip in
`docs/docs/configure/providers.md` to refer to the display name
rather than the internal ID.
2. Coderabbit — the custom-URL example in `docs/docs/getting-started.md`
used `api-url::instance-name::api-key` which is ambiguous; the parser
requires `http(s)://`. Replaced with a concrete
`https://api.example.com::...` example and added a sentence stating
the scheme is required.
Also reverted provider.ts, acp/agent.ts, provider.test.ts, and
release-v0.5.20-adversarial.test.ts to use the original `altimate-default`
ID.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f7b9497 commit c3fc44d
6 files changed
Lines changed: 91 additions & 17 deletions
File tree
- docs/docs
- configure
- packages/opencode
- src
- altimate/api
- cli/cmd/tui/component
- provider
- test/altimate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
84 | 98 | | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
89 | 103 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
94 | 118 | | |
95 | 119 | | |
| 120 | + | |
96 | 121 | | |
97 | 122 | | |
98 | 123 | | |
| |||
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
220 | 224 | | |
221 | 225 | | |
222 | 226 | | |
223 | | - | |
| 227 | + | |
224 | 228 | | |
225 | 229 | | |
226 | 230 | | |
| |||
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
255 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
256 | 263 | | |
257 | 264 | | |
258 | | - | |
| 265 | + | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
| |||
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
274 | | - | |
| 281 | + | |
275 | 282 | | |
276 | 283 | | |
277 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
1118 | 1122 | | |
1119 | 1123 | | |
1120 | 1124 | | |
1121 | | - | |
| 1125 | + | |
1122 | 1126 | | |
1123 | 1127 | | |
1124 | 1128 | | |
| |||
1141 | 1145 | | |
1142 | 1146 | | |
1143 | 1147 | | |
1144 | | - | |
| 1148 | + | |
1145 | 1149 | | |
1146 | 1150 | | |
1147 | 1151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
| 273 | + | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
277 | 308 | | |
278 | 309 | | |
279 | 310 | | |
| |||
0 commit comments