hoomanjs 1.33.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -264
- package/dist/acp/sessions/options.js +2 -2
- package/dist/acp/sessions/options.js.map +1 -1
- package/dist/chat/app.js +5 -19
- package/dist/chat/app.js.map +1 -1
- package/dist/chat/components/ChromePicker.js +1 -1
- package/dist/chat/components/ChromePicker.js.map +1 -1
- package/dist/chat/index.js.map +1 -1
- package/dist/configure/app.js +1000 -387
- package/dist/configure/app.js.map +1 -1
- package/dist/configure/index.js.map +1 -1
- package/dist/configure/types.d.ts +18 -0
- package/dist/core/agent/index.js +4 -3
- package/dist/core/agent/index.js.map +1 -1
- package/dist/core/config.d.ts +310 -80
- package/dist/core/config.js +93 -209
- package/dist/core/config.js.map +1 -1
- package/dist/core/mcp/manager.js +1 -1
- package/dist/core/mcp/manager.js.map +1 -1
- package/dist/core/mcp/oauth/provider.js.map +1 -1
- package/dist/core/mcp/prefixed-mcp-tool.d.ts +0 -1
- package/dist/core/mcp/prefixed-mcp-tool.js +0 -2
- package/dist/core/mcp/prefixed-mcp-tool.js.map +1 -1
- package/dist/core/models/anthropic.d.ts +3 -12
- package/dist/core/models/anthropic.js +20 -91
- package/dist/core/models/anthropic.js.map +1 -1
- package/dist/core/models/azure.d.ts +4 -0
- package/dist/core/models/azure.js +26 -0
- package/dist/core/models/azure.js.map +1 -0
- package/dist/core/models/bedrock.d.ts +3 -20
- package/dist/core/models/bedrock.js +22 -18
- package/dist/core/models/bedrock.js.map +1 -1
- package/dist/core/models/google.d.ts +2 -9
- package/dist/core/models/google.js +12 -31
- package/dist/core/models/google.js.map +1 -1
- package/dist/core/models/groq.d.ts +2 -9
- package/dist/core/models/groq.js +15 -25
- package/dist/core/models/groq.js.map +1 -1
- package/dist/core/models/index.d.ts +2 -1
- package/dist/core/models/index.js +3 -0
- package/dist/core/models/index.js.map +1 -1
- package/dist/core/models/minimax.d.ts +2 -0
- package/dist/core/models/minimax.js +11 -0
- package/dist/core/models/minimax.js.map +1 -0
- package/dist/core/models/moonshot.d.ts +2 -10
- package/dist/core/models/moonshot.js +23 -38
- package/dist/core/models/moonshot.js.map +1 -1
- package/dist/core/models/ollama/index.d.ts +2 -1
- package/dist/core/models/ollama/index.js +12 -5
- package/dist/core/models/ollama/index.js.map +1 -1
- package/dist/core/models/openai.d.ts +3 -4
- package/dist/core/models/openai.js +20 -3
- package/dist/core/models/openai.js.map +1 -1
- package/dist/core/models/openrouter.d.ts +4 -0
- package/dist/core/models/openrouter.js +23 -0
- package/dist/core/models/openrouter.js.map +1 -0
- package/dist/core/models/types.d.ts +346 -0
- package/dist/core/models/types.js +220 -0
- package/dist/core/models/types.js.map +1 -0
- package/dist/core/models/xai.d.ts +2 -9
- package/dist/core/models/xai.js +15 -25
- package/dist/core/models/xai.js.map +1 -1
- package/dist/core/skills/built-in/hooman-config/SKILL.md +87 -193
- package/dist/core/subagents/runner.js +1 -1
- package/dist/core/subagents/runner.js.map +1 -1
- package/dist/core/tools/filesystem.js +2 -9
- package/dist/core/tools/filesystem.js.map +1 -1
- package/dist/core/tools/shell.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ It gives you a practical toolkit to build and run agent workflows:
|
|
|
21
21
|
- a one-shot `exec` command for single prompts
|
|
22
22
|
- a stateful `chat` interface for iterative sessions
|
|
23
23
|
- a `daemon` command for channel-driven MCP automation
|
|
24
|
-
- an in-chat `/config` workflow (Ink-powered) for
|
|
24
|
+
- an in-chat `/config` workflow (Ink-powered) for general settings, models, MCP servers, and installed skills
|
|
25
25
|
- an `acp` command for running Hooman as an Agent Client Protocol (ACP) agent over stdio
|
|
26
26
|
|
|
27
27
|
## Related
|
|
@@ -30,7 +30,7 @@ It gives you a practical toolkit to build and run agent workflows:
|
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
33
|
-
- Multiple LLM providers: `anthropic`, `bedrock`, `google`, `groq`, `moonshot`, `ollama`, `openai`, `xai`
|
|
33
|
+
- Multiple LLM providers: `anthropic`, `azure`, `bedrock`, `google`, `groq`, `minimax`, `moonshot`, `ollama`, `openai`, `openrouter`, `xai`
|
|
34
34
|
- Local configuration under `~/.hooman`
|
|
35
35
|
- Optional web search tool with provider selection (`brave`, `exa`, `firecrawl`, `serper`, or `tavily`)
|
|
36
36
|
- MCP server support via `stdio`, `streamable-http`, and `sse`
|
|
@@ -264,11 +264,12 @@ The configuration workflow is launched from inside a `chat` session with the `/c
|
|
|
264
264
|
|
|
265
265
|
The configuration UI currently lets you:
|
|
266
266
|
|
|
267
|
-
-
|
|
267
|
+
- manage general settings such as name, prompts, tools, and compaction
|
|
268
|
+
- manage models and providers with field-by-field editors
|
|
268
269
|
- choose search provider and set its API key
|
|
269
270
|
- toggle bundled harness prompts (`behaviour`, `communication`, `execution`, `guardrails`)
|
|
270
271
|
- edit `instructions.md` in your `$VISUAL` / `$EDITOR` (cross-platform fallback included)
|
|
271
|
-
- add, edit, and delete MCP servers with confirmation
|
|
272
|
+
- add, edit, and delete MCP servers with field-by-field editors and confirmation
|
|
272
273
|
- search, install, refresh, and remove skills
|
|
273
274
|
|
|
274
275
|
### `hooman acp`
|
|
@@ -314,27 +315,24 @@ Important files and folders:
|
|
|
314
315
|
|
|
315
316
|
## Example `config.json`
|
|
316
317
|
|
|
317
|
-
The on-disk shape uses a reusable **`providers`** array plus a non-empty **`llms`** array. Each provider stores
|
|
318
|
+
The on-disk shape uses a reusable **`providers`** array plus a non-empty **`llms`** array. Each provider stores a runtime `provider` id plus provider-specific `options`; each LLM references a provider by name, stores its model `options`, and marks one entry as the default. The bundled **hooman-config** skill documents the full schema.
|
|
318
319
|
|
|
319
320
|
```json
|
|
320
321
|
{
|
|
321
322
|
"name": "Hooman",
|
|
322
323
|
"providers": [
|
|
323
324
|
{
|
|
324
|
-
"name": "
|
|
325
|
-
"
|
|
326
|
-
|
|
327
|
-
"params": {}
|
|
328
|
-
}
|
|
325
|
+
"name": "Ollama",
|
|
326
|
+
"provider": "ollama",
|
|
327
|
+
"options": {}
|
|
329
328
|
}
|
|
330
329
|
],
|
|
331
330
|
"llms": [
|
|
332
331
|
{
|
|
333
332
|
"name": "Default",
|
|
333
|
+
"provider": "Ollama",
|
|
334
334
|
"options": {
|
|
335
|
-
"
|
|
336
|
-
"model": "gemma4:e4b",
|
|
337
|
-
"params": {}
|
|
335
|
+
"model": "gemma4:e4b"
|
|
338
336
|
},
|
|
339
337
|
"default": true
|
|
340
338
|
}
|
|
@@ -355,25 +353,12 @@ The on-disk shape uses a reusable **`providers`** array plus a non-empty **`llms
|
|
|
355
353
|
"guardrails": true
|
|
356
354
|
},
|
|
357
355
|
"tools": {
|
|
358
|
-
"todo": {
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
"
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
"filesystem": {
|
|
365
|
-
"enabled": true
|
|
366
|
-
},
|
|
367
|
-
"shell": {
|
|
368
|
-
"enabled": true
|
|
369
|
-
},
|
|
370
|
-
"sleep": {
|
|
371
|
-
"enabled": true
|
|
372
|
-
},
|
|
373
|
-
"agents": {
|
|
374
|
-
"enabled": true,
|
|
375
|
-
"concurrency": 2
|
|
376
|
-
}
|
|
356
|
+
"todo": { "enabled": true },
|
|
357
|
+
"fetch": { "enabled": true },
|
|
358
|
+
"filesystem": { "enabled": true },
|
|
359
|
+
"shell": { "enabled": true },
|
|
360
|
+
"sleep": { "enabled": true },
|
|
361
|
+
"agents": { "enabled": true, "concurrency": 2 }
|
|
377
362
|
},
|
|
378
363
|
"compaction": {
|
|
379
364
|
"ratio": 0.75,
|
|
@@ -386,19 +371,20 @@ Tool approvals are session-scoped and are not persisted in `config.json`.
|
|
|
386
371
|
|
|
387
372
|
Hooman enables Strands `ContextOffloader` by default with file-backed storage under `~/.hooman/sessions/offloaded-content`, so large tool results can be previewed in-context and retrieved later without bloating the active conversation window.
|
|
388
373
|
|
|
389
|
-
Supported `providers[].
|
|
374
|
+
Supported `providers[].provider` values registered in this release (see `src/core/models/index.ts`):
|
|
390
375
|
|
|
391
376
|
- `anthropic`
|
|
377
|
+
- `azure`
|
|
392
378
|
- `bedrock`
|
|
393
379
|
- `google`
|
|
394
380
|
- `groq`
|
|
381
|
+
- `minimax`
|
|
395
382
|
- `moonshot`
|
|
396
383
|
- `ollama`
|
|
397
384
|
- `openai`
|
|
385
|
+
- `openrouter`
|
|
398
386
|
- `xai`
|
|
399
387
|
|
|
400
|
-
The `LlmProvider` enum in `src/core/config.ts` may list additional strings for forwards compatibility; unknown providers are not loaded at runtime.
|
|
401
|
-
|
|
402
388
|
Supported `search.provider` values:
|
|
403
389
|
|
|
404
390
|
- `brave`
|
|
@@ -409,253 +395,62 @@ Supported `search.provider` values:
|
|
|
409
395
|
|
|
410
396
|
## Provider Notes
|
|
411
397
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
Good default for local usage. Example:
|
|
415
|
-
|
|
416
|
-
```json
|
|
417
|
-
{
|
|
418
|
-
"providers": [
|
|
419
|
-
{
|
|
420
|
-
"name": "ollama-local",
|
|
421
|
-
"options": {
|
|
422
|
-
"provider": "ollama",
|
|
423
|
-
"params": {}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
],
|
|
427
|
-
"llms": [
|
|
428
|
-
{
|
|
429
|
-
"name": "Default",
|
|
430
|
-
"options": {
|
|
431
|
-
"provider": "ollama-local",
|
|
432
|
-
"model": "gemma4:e4b",
|
|
433
|
-
"params": {}
|
|
434
|
-
},
|
|
435
|
-
"default": true
|
|
436
|
-
}
|
|
437
|
-
]
|
|
438
|
-
}
|
|
439
|
-
```
|
|
440
|
-
|
|
441
|
-
### OpenAI
|
|
442
|
-
|
|
443
|
-
Uses Strands **OpenAIModel** (Chat Completions). `apiKey` is optional if `OPENAI_API_KEY` is set. Use `clientConfig` for a custom base URL or other OpenAI client options (OpenAI-compatible proxies and gateways).
|
|
444
|
-
|
|
445
|
-
Example:
|
|
446
|
-
|
|
447
|
-
```json
|
|
448
|
-
{
|
|
449
|
-
"providers": [
|
|
450
|
-
{
|
|
451
|
-
"name": "openai",
|
|
452
|
-
"options": {
|
|
453
|
-
"provider": "openai",
|
|
454
|
-
"params": {
|
|
455
|
-
"apiKey": "..."
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
],
|
|
460
|
-
"llms": [
|
|
461
|
-
{
|
|
462
|
-
"name": "GPT-5",
|
|
463
|
-
"options": {
|
|
464
|
-
"provider": "openai",
|
|
465
|
-
"model": "gpt-5",
|
|
466
|
-
"params": {}
|
|
467
|
-
},
|
|
468
|
-
"default": true
|
|
469
|
-
}
|
|
470
|
-
]
|
|
471
|
-
}
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
OpenAI-compatible gateways that put token `usage` on the last streamed chunk together with `choices` are handled via a small stream shim so usage still surfaces in the UI.
|
|
475
|
-
|
|
476
|
-
### Anthropic
|
|
477
|
-
|
|
478
|
-
Uses Strands **AnthropicModel** (Anthropic Messages API). `apiKey` or `authToken`, optional `baseURL` and `headers` (merged into `clientConfig`), optional `clientConfig`, and model fields such as `temperature` and `maxTokens`. A prebuilt `client` is not configurable from JSON.
|
|
479
|
-
|
|
480
|
-
```json
|
|
481
|
-
{
|
|
482
|
-
"providers": [
|
|
483
|
-
{
|
|
484
|
-
"name": "anthropic",
|
|
485
|
-
"options": {
|
|
486
|
-
"provider": "anthropic",
|
|
487
|
-
"params": {
|
|
488
|
-
"apiKey": "..."
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
],
|
|
493
|
-
"llms": [
|
|
494
|
-
{
|
|
495
|
-
"name": "Claude Sonnet",
|
|
496
|
-
"options": {
|
|
497
|
-
"provider": "anthropic",
|
|
498
|
-
"model": "claude-sonnet-4-20250514",
|
|
499
|
-
"params": {
|
|
500
|
-
"temperature": 0.7
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
|
-
"default": true
|
|
504
|
-
}
|
|
505
|
-
]
|
|
506
|
-
}
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
### Google
|
|
510
|
-
|
|
511
|
-
Uses Strands `GoogleModel` on top of `@google/genai`. Top-level options like `apiKey`, `client`, `clientConfig`, and `builtInTools` are supported; other values go into Google generation params.
|
|
398
|
+
Provider entries now look like:
|
|
512
399
|
|
|
513
400
|
```json
|
|
514
401
|
{
|
|
515
|
-
"
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
"provider": "google",
|
|
520
|
-
"params": {
|
|
521
|
-
"apiKey": "..."
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
],
|
|
526
|
-
"llms": [
|
|
527
|
-
{
|
|
528
|
-
"name": "Gemini Flash",
|
|
529
|
-
"options": {
|
|
530
|
-
"provider": "google",
|
|
531
|
-
"model": "gemini-2.5-flash",
|
|
532
|
-
"params": {
|
|
533
|
-
"temperature": 0.7,
|
|
534
|
-
"maxOutputTokens": 2048,
|
|
535
|
-
"topP": 0.9,
|
|
536
|
-
"topK": 40
|
|
537
|
-
}
|
|
538
|
-
},
|
|
539
|
-
"default": true
|
|
540
|
-
}
|
|
541
|
-
]
|
|
542
|
-
}
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
### Bedrock
|
|
546
|
-
|
|
547
|
-
Supports `region`, `clientConfig`, and optional `apiKey`, with all other values forwarded as Bedrock model options.
|
|
548
|
-
|
|
549
|
-
```json
|
|
550
|
-
{
|
|
551
|
-
"providers": [
|
|
552
|
-
{
|
|
553
|
-
"name": "bedrock-dev",
|
|
554
|
-
"options": {
|
|
555
|
-
"provider": "bedrock",
|
|
556
|
-
"params": {
|
|
557
|
-
"region": "us-east-1",
|
|
558
|
-
"clientConfig": {
|
|
559
|
-
"profile": "dev",
|
|
560
|
-
"maxAttempts": 3,
|
|
561
|
-
"credentials": {
|
|
562
|
-
"accessKeyId": "AKIA...",
|
|
563
|
-
"secretAccessKey": "...",
|
|
564
|
-
"sessionToken": "..."
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
],
|
|
571
|
-
"llms": [
|
|
572
|
-
{
|
|
573
|
-
"name": "Claude Sonnet",
|
|
574
|
-
"options": {
|
|
575
|
-
"provider": "bedrock-dev",
|
|
576
|
-
"model": "anthropic.claude-sonnet-4-20250514-v1:0",
|
|
577
|
-
"params": {
|
|
578
|
-
"temperature": 0.7,
|
|
579
|
-
"maxTokens": 1024
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
"default": true
|
|
583
|
-
}
|
|
584
|
-
]
|
|
585
|
-
}
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
You can also rely on the AWS default credential chain (recommended) by setting environment variables such as `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and optionally `AWS_SESSION_TOKEN`.
|
|
589
|
-
|
|
590
|
-
### Groq
|
|
591
|
-
|
|
592
|
-
### Anthropic
|
|
593
|
-
|
|
594
|
-
Uses Strands `AnthropicModel` on top of `@anthropic-ai/sdk`. Provider-specific settings `apiKey`/`authToken`, `baseURL`, `headers`, `clientConfig`, `betas`, and `useNativeTokenCount` are picked up directly. Standard model config such as `temperature`, `topP`, `maxTokens`, and `stopSequences` stays top-level. Any other keys are forwarded to the Anthropic Messages request body, which is useful for Anthropic-compatible providers such as MiniMax.
|
|
595
|
-
|
|
596
|
-
For MiniMax specifically:
|
|
597
|
-
|
|
598
|
-
- Use `baseURL: "https://api.minimax.io/anthropic"`.
|
|
599
|
-
- `MiniMax-M3` can emit visible thinking blocks when you set `thinking: { "type": "adaptive" }`.
|
|
600
|
-
- `MiniMax-M2.7` / `M2.5` / `M2.1` / `M2` do internal reasoning, but MiniMax’s Anthropic-compatible API does not expose those as `thinking` content blocks, so Hooman has nothing to render in the transcript.
|
|
601
|
-
|
|
602
|
-
```json
|
|
603
|
-
{
|
|
604
|
-
"provider": "anthropic",
|
|
605
|
-
"model": "MiniMax-M3",
|
|
606
|
-
"params": {
|
|
607
|
-
"apiKey": "...",
|
|
608
|
-
"baseURL": "https://api.minimax.io/anthropic",
|
|
609
|
-
"thinking": { "type": "adaptive" },
|
|
610
|
-
"temperature": 1
|
|
402
|
+
"name": "MiniMax",
|
|
403
|
+
"provider": "minimax",
|
|
404
|
+
"options": {
|
|
405
|
+
"apiKey": "..."
|
|
611
406
|
}
|
|
612
407
|
}
|
|
613
408
|
```
|
|
614
409
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
Uses the Vercel AI SDK Groq provider (`@ai-sdk/groq`) on top of Strands `VercelModel`. Provider-specific settings `apiKey`, `baseURL`, and `headers` are picked up; other values are forwarded into the model config (`temperature`, `maxTokens`, etc.). Defaults to `GROQ_API_KEY` from the environment when no `apiKey` is supplied.
|
|
410
|
+
LLM entries reference a provider by name and carry normalized model options:
|
|
618
411
|
|
|
619
412
|
```json
|
|
620
413
|
{
|
|
621
|
-
"
|
|
622
|
-
"
|
|
623
|
-
"
|
|
624
|
-
"
|
|
625
|
-
"temperature":
|
|
626
|
-
|
|
414
|
+
"name": "MiniMax M3",
|
|
415
|
+
"provider": "MiniMax",
|
|
416
|
+
"options": {
|
|
417
|
+
"model": "MiniMax-M3",
|
|
418
|
+
"temperature": 1,
|
|
419
|
+
"maxTokens": 4096
|
|
420
|
+
},
|
|
421
|
+
"default": true
|
|
627
422
|
}
|
|
628
423
|
```
|
|
629
424
|
|
|
630
|
-
|
|
425
|
+
Supported provider option fields:
|
|
631
426
|
|
|
632
|
-
|
|
427
|
+
- `anthropic`: `apiKey`, optional `baseURL`, optional `headers`, optional `thinking`
|
|
428
|
+
- `azure`: optional `resourceName`, optional `baseURL`, optional `apiKey`, optional `headers`, optional `apiVersion`, optional `useDeploymentBasedUrls`
|
|
429
|
+
- `bedrock`: `region`, `accessKeyId`, `secretAccessKey`, optional `sessionToken`, optional `apiKey`
|
|
430
|
+
- `google`: `apiKey`
|
|
431
|
+
- `groq`: `apiKey`, optional `baseURL`, optional `headers`
|
|
432
|
+
- `minimax`: `apiKey`, optional `headers`, optional `thinking`
|
|
433
|
+
- `moonshot`: `apiKey`, optional `baseURL`, optional `headers`
|
|
434
|
+
- `ollama`: optional `baseURL`, optional `thinking`
|
|
435
|
+
- `openai`: `apiKey`, optional `baseURL`, optional `headers`
|
|
436
|
+
- `openrouter`: `apiKey`, optional `baseURL`, optional `headers`
|
|
437
|
+
- `xai`: `apiKey`, optional `baseURL`, optional `headers`
|
|
633
438
|
|
|
634
|
-
|
|
635
|
-
{
|
|
636
|
-
"provider": "moonshot",
|
|
637
|
-
"model": "kimi-k2.5",
|
|
638
|
-
"params": {
|
|
639
|
-
"apiKey": "...",
|
|
640
|
-
"temperature": 0.7
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
```
|
|
439
|
+
Normalized LLM option fields:
|
|
644
440
|
|
|
645
|
-
|
|
441
|
+
- `model`
|
|
442
|
+
- optional `temperature`
|
|
443
|
+
- optional `maxTokens`
|
|
646
444
|
|
|
647
|
-
|
|
445
|
+
Notes:
|
|
648
446
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
```
|
|
447
|
+
- Google maps normalized `maxTokens` to the SDK's `maxOutputTokens` internally.
|
|
448
|
+
- Azure uses the Vercel AI SDK `@ai-sdk/azure` provider. Set the LLM `model` to your Azure deployment name, not the raw OpenAI model id.
|
|
449
|
+
- Ollama maps normalized `temperature` into Ollama `options.temperature`.
|
|
450
|
+
- MiniMax uses the Anthropic-compatible endpoint `https://api.minimax.io/anthropic` automatically.
|
|
451
|
+
- Moonshot defaults `baseURL` to `https://api.moonshot.ai/v1` when it is omitted.
|
|
452
|
+
- OpenRouter defaults `baseURL` to `https://openrouter.ai/api/v1` when it is omitted, and model names are usually provider-qualified ids such as `anthropic/claude-3.5-sonnet`.
|
|
453
|
+
- Bedrock can rely on the AWS default credential chain when explicit credentials are not provided.
|
|
659
454
|
|
|
660
455
|
## MCP Configuration
|
|
661
456
|
|
|
@@ -797,6 +592,19 @@ Run typecheck:
|
|
|
797
592
|
npm run typecheck
|
|
798
593
|
```
|
|
799
594
|
|
|
595
|
+
Build the project:
|
|
596
|
+
|
|
597
|
+
```bash
|
|
598
|
+
npm run build
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
After making any code change, run both verification steps:
|
|
602
|
+
|
|
603
|
+
```bash
|
|
604
|
+
npm run typecheck
|
|
605
|
+
npm run build
|
|
606
|
+
```
|
|
607
|
+
|
|
800
608
|
## License
|
|
801
609
|
|
|
802
610
|
MIT. See `LICENSE`.
|
|
@@ -31,8 +31,8 @@ export function buildSessionConfigOptions(config, agent) {
|
|
|
31
31
|
description: (() => {
|
|
32
32
|
const resolved = config.resolveLlm(m.name);
|
|
33
33
|
return resolved
|
|
34
|
-
? `${m.
|
|
35
|
-
: `${m.
|
|
34
|
+
? `${m.provider} -> ${resolved.provider}/${resolved.llmOptions.model}`
|
|
35
|
+
: `${m.provider}/${m.options.model}`;
|
|
36
36
|
})(),
|
|
37
37
|
})),
|
|
38
38
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/acp/sessions/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOxD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,M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= entry.name === current ? "*" : "-";
|
|
228
228
|
const resolved = config.resolveLlm(entry.name);
|
|
229
229
|
if (!resolved) {
|
|
230
|
-
return `${marker} ${entry.name} (${entry.
|
|
230
|
+
return `${marker} ${entry.name} (${entry.provider}/${entry.options.model})`;
|
|
231
231
|
}
|
|
232
|
-
return `${marker} ${entry.name} (${entry.
|
|
232
|
+
return `${marker} ${entry.name} (${entry.provider} -> ${resolved.provider}/${resolved.llmOptions.model})`;
|
|
233
233
|
});
|
|
234
234
|
return [
|
|
235
235
|
`Current model: ${current}`,
|
|
@@ -436,21 +436,6 @@ export function ChatApp({ agent, config, sessionId, manager, registry, approvals
|
|
|
436
436
|
const removeLine = useCallback((id) => {
|
|
437
437
|
setLines((prev) => prev.filter((line) => line.id !== id));
|
|
438
438
|
}, []);
|
|
439
|
-
const moveLineToEnd = useCallback((id) => {
|
|
440
|
-
setLines((prev) => {
|
|
441
|
-
const index = prev.findIndex((line) => line.id === id);
|
|
442
|
-
if (index === -1 || index === prev.length - 1) {
|
|
443
|
-
return prev;
|
|
444
|
-
}
|
|
445
|
-
const next = [...prev];
|
|
446
|
-
const [line] = next.splice(index, 1);
|
|
447
|
-
if (!line) {
|
|
448
|
-
return prev;
|
|
449
|
-
}
|
|
450
|
-
next.push(line);
|
|
451
|
-
return next;
|
|
452
|
-
});
|
|
453
|
-
}, []);
|
|
454
439
|
const replaceAssistantText = useCallback((text) => {
|
|
455
440
|
const id = assistantLineIdRef.current;
|
|
456
441
|
if (!id) {
|
|
@@ -579,8 +564,9 @@ export function ChatApp({ agent, config, sessionId, manager, registry, approvals
|
|
|
579
564
|
})),
|
|
580
565
|
});
|
|
581
566
|
try {
|
|
582
|
-
const
|
|
583
|
-
|
|
567
|
+
const resolved = config.llm;
|
|
568
|
+
const provider = await modelProviders[resolved.provider]();
|
|
569
|
+
agent.model = provider.create(resolved.providerOptions, resolved.llmOptions);
|
|
584
570
|
}
|
|
585
571
|
catch (error) {
|
|
586
572
|
config.update({
|