augint-shell 0.124.0__tar.gz → 0.124.2__tar.gz
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.
- augint_shell-0.124.0/README.md → augint_shell-0.124.2/PKG-INFO +25 -7
- augint_shell-0.124.0/PKG-INFO → augint_shell-0.124.2/README.md +11 -21
- {augint_shell-0.124.0 → augint_shell-0.124.2}/pyproject.toml +1 -1
- {augint_shell-0.124.0 → augint_shell-0.124.2}/pyproject.toml.orig +1 -1
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/__init__.py +1 -1
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/opencode.py +70 -13
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/ai-shell.yaml +1 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/acp.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/assets/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/assets/comfyui/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/assets/comfyui/provision.sh +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cache.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cdp_relay.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/claude_login.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/__main__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/commands/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/commands/acp.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/commands/llm.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/commands/manage.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/commands/tools.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/cli/commands/vpn.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/config.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/container.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/defaults.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/exceptions.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/expo.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/gpu.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/local_chrome.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/models.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/qr.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/remote.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/scaffold.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/standalone.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/t3.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/augint-env.example +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/container/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/container/context.md +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/n8n/workflows/chat_with_ollama.json +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/n8n/workflows/text_to_speech.json +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/templates/n8n/workflows/transcribe_audio.json +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/typeahead.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.2}/src/ai_shell/vpn.py +0 -0
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: augint-shell
|
|
3
|
+
Version: 0.124.2
|
|
4
|
+
Summary: Launch AI coding tools and local LLMs in Docker containers
|
|
5
|
+
Author: svange
|
|
6
|
+
Requires-Dist: docker>=7.0.0
|
|
7
|
+
Requires-Dist: click>=8.1.0
|
|
8
|
+
Requires-Dist: rich>=14.0
|
|
9
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
10
|
+
Requires-Dist: pyyaml>=6.0
|
|
11
|
+
Requires-Dist: segno>=1.6
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
1
15
|
# augint-shell
|
|
2
16
|
|
|
3
17
|
[](https://github.com/svange/augint-shell/actions/workflows/publish.yaml)
|
|
@@ -69,16 +83,18 @@ One command replaces the old Makefile + docker-compose.yml workflow.
|
|
|
69
83
|
### Prerequisites
|
|
70
84
|
|
|
71
85
|
- Docker, or Podman with the `docker` CLI shim (`podman-docker`) and `DOCKER_HOST` pointing at its socket
|
|
72
|
-
-
|
|
86
|
+
- [uv](https://docs.astral.sh/uv/) (it installs its own Python; **not required** when using the standalone binary)
|
|
73
87
|
- (Optional) NVIDIA GPU + drivers for local LLM acceleration
|
|
74
88
|
|
|
75
89
|
### First-time setup
|
|
76
90
|
|
|
77
91
|
```bash
|
|
78
|
-
|
|
79
|
-
#
|
|
92
|
+
uv tool install augint-shell
|
|
93
|
+
# update later: uv tool upgrade augint-shell
|
|
80
94
|
```
|
|
81
95
|
|
|
96
|
+
Do not install it with `pip` into a system Python. When that Python is removed, its `Scripts\ai-shell.exe` (or `bin/ai-shell`) stays behind, can stay first on `PATH`, and exits with no output.
|
|
97
|
+
|
|
82
98
|
#### Without Python or PyPI (standalone binary)
|
|
83
99
|
|
|
84
100
|
On systems that block Python package registries or do not allow `pip` / host Python installations, `ai-shell` is also distributed as a single self-contained executable that requires no root/admin privileges and no host Python:
|
|
@@ -587,8 +603,10 @@ A model given as `bedrock-mantle/openai.gpt-5.4` (or unqualified) is moved to th
|
|
|
587
603
|
- Otherwise, `ai-shell` makes a short-term Bedrock API key from your AWS profile (`--aws-profile` / `--profile`, or `opencode.aws_profile`) before it starts OpenCode. The key is the same one `aws-bedrock-token-generator` makes. It lasts 12 hours, or less when the SSO session ends sooner. Run `aws sso login --profile <profile>` first. Disable with `--no-generate-token`.
|
|
588
604
|
- The profile needs `bedrock:CallWithBearerToken`, `bedrock-mantle:CallWithBearerToken`, `bedrock-mantle:ListModels` and `bedrock-mantle:CreateInference` for Mantle, and `bedrock:InvokeModel` on the inference profile and its models for Grok.
|
|
589
605
|
- **Default Mantle agent models**:
|
|
590
|
-
-
|
|
591
|
-
-
|
|
606
|
+
- Commercial AWS: primary agents (`plan`, `build`) `bedrock-mantle-openai/openai.gpt-5.6-terra`; subagents (`explore`, `general`) and `small_model` `bedrock-mantle-openai/openai.gpt-5.6-luna`.
|
|
607
|
+
- AWS GovCloud: `bedrock-mantle/openai.gpt-oss-120b` for all of them. On 2026-11-19 a standalone GovCloud account got "not available for this account" for GPT-5.6 Terra, Luna and GPT-5.4, and Grok on that account had a small daily token quota ("Too many tokens per day"). Set `model` and `subagent_model` when your account has access to more.
|
|
608
|
+
- **Model limits**: every Bedrock model in `opencode.json` gets a `limit` (context and output tokens, from the Bedrock model cards; 128000/16384 when no figure is published). Without one, OpenCode reads any failed request as a context overflow and the real error is hidden.
|
|
609
|
+
- **Only GovCloud providers in GovCloud**: a GovCloud config sets `enabled_providers` to the providers ai-shell writes (the three Bedrock providers and your `endpoints`). It also adds `amazon-bedrock` (OpenCode's built-in Bedrock provider, which lists Anthropic models) and `opencode` (OpenCode's hosted models, outside AWS) to `disabled_providers`; your own entries in that list are kept.
|
|
592
610
|
|
|
593
611
|
```bash
|
|
594
612
|
# Commercial AWS (defaults to us-east-1) using an AWS SSO profile
|
|
@@ -603,14 +621,14 @@ aws sso login --profile ai-gov
|
|
|
603
621
|
ai-shell opencode --aws --aws-partition govcloud --aws-profile ai-gov
|
|
604
622
|
```
|
|
605
623
|
|
|
606
|
-
A standalone GovCloud account
|
|
624
|
+
A standalone GovCloud account with access to GPT-5.6 Terra (for planning and building) and GPT-5.6 Luna (for subagents), and an optional own model on a GPU instance that you reach through a Session Manager port forward on host port 8000. Put this in `~/.augint/.ai-shell.yaml`:
|
|
607
625
|
|
|
608
626
|
```yaml
|
|
609
627
|
opencode:
|
|
610
628
|
provider: bedrock-mantle
|
|
611
629
|
aws_partition: govcloud
|
|
612
630
|
aws_profile: ai-gov
|
|
613
|
-
model: openai.gpt-5.6-terra # or xai.grok-4.7
|
|
631
|
+
model: openai.gpt-5.6-terra # or xai.grok-4.7; without these two lines: openai.gpt-oss-120b
|
|
614
632
|
subagent_model: openai.gpt-5.6-luna
|
|
615
633
|
endpoints:
|
|
616
634
|
govcloud-gpu:
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: augint-shell
|
|
3
|
-
Version: 0.124.0
|
|
4
|
-
Summary: Launch AI coding tools and local LLMs in Docker containers
|
|
5
|
-
Author: svange
|
|
6
|
-
Requires-Dist: docker>=7.0.0
|
|
7
|
-
Requires-Dist: click>=8.1.0
|
|
8
|
-
Requires-Dist: rich>=14.0
|
|
9
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
10
|
-
Requires-Dist: pyyaml>=6.0
|
|
11
|
-
Requires-Dist: segno>=1.6
|
|
12
|
-
Requires-Python: >=3.12
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
|
|
15
1
|
# augint-shell
|
|
16
2
|
|
|
17
3
|
[](https://github.com/svange/augint-shell/actions/workflows/publish.yaml)
|
|
@@ -83,16 +69,18 @@ One command replaces the old Makefile + docker-compose.yml workflow.
|
|
|
83
69
|
### Prerequisites
|
|
84
70
|
|
|
85
71
|
- Docker, or Podman with the `docker` CLI shim (`podman-docker`) and `DOCKER_HOST` pointing at its socket
|
|
86
|
-
-
|
|
72
|
+
- [uv](https://docs.astral.sh/uv/) (it installs its own Python; **not required** when using the standalone binary)
|
|
87
73
|
- (Optional) NVIDIA GPU + drivers for local LLM acceleration
|
|
88
74
|
|
|
89
75
|
### First-time setup
|
|
90
76
|
|
|
91
77
|
```bash
|
|
92
|
-
|
|
93
|
-
#
|
|
78
|
+
uv tool install augint-shell
|
|
79
|
+
# update later: uv tool upgrade augint-shell
|
|
94
80
|
```
|
|
95
81
|
|
|
82
|
+
Do not install it with `pip` into a system Python. When that Python is removed, its `Scripts\ai-shell.exe` (or `bin/ai-shell`) stays behind, can stay first on `PATH`, and exits with no output.
|
|
83
|
+
|
|
96
84
|
#### Without Python or PyPI (standalone binary)
|
|
97
85
|
|
|
98
86
|
On systems that block Python package registries or do not allow `pip` / host Python installations, `ai-shell` is also distributed as a single self-contained executable that requires no root/admin privileges and no host Python:
|
|
@@ -601,8 +589,10 @@ A model given as `bedrock-mantle/openai.gpt-5.4` (or unqualified) is moved to th
|
|
|
601
589
|
- Otherwise, `ai-shell` makes a short-term Bedrock API key from your AWS profile (`--aws-profile` / `--profile`, or `opencode.aws_profile`) before it starts OpenCode. The key is the same one `aws-bedrock-token-generator` makes. It lasts 12 hours, or less when the SSO session ends sooner. Run `aws sso login --profile <profile>` first. Disable with `--no-generate-token`.
|
|
602
590
|
- The profile needs `bedrock:CallWithBearerToken`, `bedrock-mantle:CallWithBearerToken`, `bedrock-mantle:ListModels` and `bedrock-mantle:CreateInference` for Mantle, and `bedrock:InvokeModel` on the inference profile and its models for Grok.
|
|
603
591
|
- **Default Mantle agent models**:
|
|
604
|
-
-
|
|
605
|
-
-
|
|
592
|
+
- Commercial AWS: primary agents (`plan`, `build`) `bedrock-mantle-openai/openai.gpt-5.6-terra`; subagents (`explore`, `general`) and `small_model` `bedrock-mantle-openai/openai.gpt-5.6-luna`.
|
|
593
|
+
- AWS GovCloud: `bedrock-mantle/openai.gpt-oss-120b` for all of them. On 2026-11-19 a standalone GovCloud account got "not available for this account" for GPT-5.6 Terra, Luna and GPT-5.4, and Grok on that account had a small daily token quota ("Too many tokens per day"). Set `model` and `subagent_model` when your account has access to more.
|
|
594
|
+
- **Model limits**: every Bedrock model in `opencode.json` gets a `limit` (context and output tokens, from the Bedrock model cards; 128000/16384 when no figure is published). Without one, OpenCode reads any failed request as a context overflow and the real error is hidden.
|
|
595
|
+
- **Only GovCloud providers in GovCloud**: a GovCloud config sets `enabled_providers` to the providers ai-shell writes (the three Bedrock providers and your `endpoints`). It also adds `amazon-bedrock` (OpenCode's built-in Bedrock provider, which lists Anthropic models) and `opencode` (OpenCode's hosted models, outside AWS) to `disabled_providers`; your own entries in that list are kept.
|
|
606
596
|
|
|
607
597
|
```bash
|
|
608
598
|
# Commercial AWS (defaults to us-east-1) using an AWS SSO profile
|
|
@@ -617,14 +607,14 @@ aws sso login --profile ai-gov
|
|
|
617
607
|
ai-shell opencode --aws --aws-partition govcloud --aws-profile ai-gov
|
|
618
608
|
```
|
|
619
609
|
|
|
620
|
-
A standalone GovCloud account
|
|
610
|
+
A standalone GovCloud account with access to GPT-5.6 Terra (for planning and building) and GPT-5.6 Luna (for subagents), and an optional own model on a GPU instance that you reach through a Session Manager port forward on host port 8000. Put this in `~/.augint/.ai-shell.yaml`:
|
|
621
611
|
|
|
622
612
|
```yaml
|
|
623
613
|
opencode:
|
|
624
614
|
provider: bedrock-mantle
|
|
625
615
|
aws_partition: govcloud
|
|
626
616
|
aws_profile: ai-gov
|
|
627
|
-
model: openai.gpt-5.6-terra # or xai.grok-4.7
|
|
617
|
+
model: openai.gpt-5.6-terra # or xai.grok-4.7; without these two lines: openai.gpt-oss-120b
|
|
628
618
|
subagent_model: openai.gpt-5.6-luna
|
|
629
619
|
endpoints:
|
|
630
620
|
govcloud-gpu:
|
|
@@ -50,6 +50,27 @@ DEFAULT_BEDROCK_MANTLE_PRIMARY_MODEL = "openai.gpt-5.6-terra"
|
|
|
50
50
|
DEFAULT_BEDROCK_MANTLE_SUBAGENT_MODEL = "openai.gpt-5.6-luna"
|
|
51
51
|
BEDROCK_MANTLE_DEFAULT_PRIMARY_MODEL = DEFAULT_BEDROCK_MANTLE_PRIMARY_MODEL
|
|
52
52
|
BEDROCK_MANTLE_DEFAULT_SUBAGENT_MODEL = DEFAULT_BEDROCK_MANTLE_SUBAGENT_MODEL
|
|
53
|
+
# GovCloud defaults: the models a standalone GovCloud account can call. On
|
|
54
|
+
# 2026-11-19 Bedrock in us-gov-west-1 answered "not available for this account"
|
|
55
|
+
# for GPT-5.6 Terra, Luna and GPT-5.4, and Grok had a small daily token quota.
|
|
56
|
+
DEFAULT_GOVCLOUD_PRIMARY_MODEL = "openai.gpt-oss-120b"
|
|
57
|
+
DEFAULT_GOVCLOUD_SUBAGENT_MODEL = "openai.gpt-oss-120b"
|
|
58
|
+
# OpenCode gives a model without a limit {context: 0, output: 0}. It then reads
|
|
59
|
+
# any failed request as a context overflow and starts a compaction that fails
|
|
60
|
+
# too, which hides the real error. Figures from the Bedrock model cards; a model
|
|
61
|
+
# without a published figure gets the conservative fallback.
|
|
62
|
+
BEDROCK_MODEL_LIMITS: dict[str, dict[str, int]] = {
|
|
63
|
+
"openai.gpt-oss-120b": {"context": 128000, "output": 16384},
|
|
64
|
+
"openai.gpt-oss-20b": {"context": 128000, "output": 16384},
|
|
65
|
+
"xai.grok-4.7": {"context": 500000, "output": 32768},
|
|
66
|
+
}
|
|
67
|
+
BEDROCK_FALLBACK_LIMIT: dict[str, int] = {"context": 128000, "output": 16384}
|
|
68
|
+
# GovCloud work must stay in GovCloud. OpenCode has built-in providers outside it:
|
|
69
|
+
# ``amazon-bedrock`` lists Anthropic models from the same AWS credentials, and
|
|
70
|
+
# ``opencode`` (OpenCode's hosted models, e.g. big-pickle) sends prompts to the
|
|
71
|
+
# internet. A GovCloud config therefore allows only the providers ai-shell writes
|
|
72
|
+
# (``enabled_providers``) and also names the known ones in ``disabled_providers``.
|
|
73
|
+
GOVCLOUD_DISABLED_PROVIDERS: tuple[str, ...] = ("amazon-bedrock", "opencode")
|
|
53
74
|
# Models listed in the OpenCode model picker. Mantle serves gpt-oss on /v1 and
|
|
54
75
|
# GPT-5.x on /openai/v1, and Grok is served by bedrock-runtime, so each list
|
|
55
76
|
# becomes its own provider.
|
|
@@ -662,6 +683,23 @@ def _drop_misrouted_mantle_models(config: dict[str, Any]) -> None:
|
|
|
662
683
|
del models[model_id]
|
|
663
684
|
|
|
664
685
|
|
|
686
|
+
def bedrock_model_limit(model_id: str) -> dict[str, int]:
|
|
687
|
+
"""OpenCode's ``limit`` for a Bedrock model ID (inference profile prefix ignored)."""
|
|
688
|
+
bare = _INFERENCE_PROFILE_PREFIX.sub("", model_id)
|
|
689
|
+
bare = re.sub(r"-\d+:\d+$", "", bare)
|
|
690
|
+
return dict(BEDROCK_MODEL_LIMITS.get(bare, BEDROCK_FALLBACK_LIMIT))
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
def _bedrock_model_entry(model_id: str) -> dict[str, Any]:
|
|
694
|
+
return {"name": model_id, "limit": bedrock_model_limit(model_id)}
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
def _model_entry(provider: str, model_id: str) -> dict[str, Any]:
|
|
698
|
+
if provider in MANTLE_PROVIDER_IDS:
|
|
699
|
+
return _bedrock_model_entry(model_id)
|
|
700
|
+
return {"name": model_id}
|
|
701
|
+
|
|
702
|
+
|
|
665
703
|
def deep_merge_dict(base: dict[str, Any], patch: dict[str, Any]) -> dict[str, Any]:
|
|
666
704
|
"""Recursively merge *patch* into a copy of *base* without clobbering sibling keys."""
|
|
667
705
|
merged: dict[str, Any] = dict(base)
|
|
@@ -713,27 +751,35 @@ def build_opencode_config_patch(
|
|
|
713
751
|
elif endpoints:
|
|
714
752
|
resolved_default_provider = endpoints[0].name
|
|
715
753
|
|
|
754
|
+
providers_patch: dict[str, Any] = {}
|
|
755
|
+
resolved_region = ""
|
|
756
|
+
if mantle_active:
|
|
757
|
+
resolved_region = resolve_bedrock_mantle_region(
|
|
758
|
+
region=effective_region_arg, partition=aws_partition
|
|
759
|
+
)
|
|
760
|
+
govcloud = resolved_region.startswith("us-gov-")
|
|
761
|
+
|
|
716
762
|
effective_primary = primary_model.strip()
|
|
717
763
|
if not effective_primary:
|
|
718
764
|
if mantle_active:
|
|
719
|
-
effective_primary =
|
|
765
|
+
effective_primary = (
|
|
766
|
+
DEFAULT_GOVCLOUD_PRIMARY_MODEL if govcloud else DEFAULT_BEDROCK_MANTLE_PRIMARY_MODEL
|
|
767
|
+
)
|
|
720
768
|
elif endpoints and endpoints[0].models:
|
|
721
769
|
effective_primary = endpoints[0].models[0]
|
|
722
770
|
|
|
723
771
|
effective_subagent = subagent_model.strip()
|
|
724
772
|
if not effective_subagent:
|
|
725
773
|
if mantle_active:
|
|
726
|
-
effective_subagent =
|
|
774
|
+
effective_subagent = (
|
|
775
|
+
DEFAULT_GOVCLOUD_SUBAGENT_MODEL
|
|
776
|
+
if govcloud
|
|
777
|
+
else DEFAULT_BEDROCK_MANTLE_SUBAGENT_MODEL
|
|
778
|
+
)
|
|
727
779
|
elif effective_primary:
|
|
728
780
|
effective_subagent = effective_primary
|
|
729
781
|
|
|
730
|
-
providers_patch: dict[str, Any] = {}
|
|
731
|
-
resolved_region = ""
|
|
732
|
-
|
|
733
782
|
if mantle_active:
|
|
734
|
-
resolved_region = resolve_bedrock_mantle_region(
|
|
735
|
-
region=effective_region_arg, partition=aws_partition
|
|
736
|
-
)
|
|
737
783
|
api_key = f"{{env:{BEDROCK_BEARER_TOKEN_VAR}}}"
|
|
738
784
|
providers_patch[BEDROCK_MANTLE_PROVIDER_ID] = {
|
|
739
785
|
"npm": OPENAI_COMPATIBLE_NPM,
|
|
@@ -742,7 +788,7 @@ def build_opencode_config_patch(
|
|
|
742
788
|
"baseURL": bedrock_mantle_base_url(region=resolved_region, partition=aws_partition),
|
|
743
789
|
"apiKey": api_key,
|
|
744
790
|
},
|
|
745
|
-
"models": {m:
|
|
791
|
+
"models": {m: _bedrock_model_entry(m) for m in BEDROCK_MANTLE_DEFAULT_MODELS},
|
|
746
792
|
}
|
|
747
793
|
providers_patch[BEDROCK_MANTLE_OPENAI_PROVIDER_ID] = {
|
|
748
794
|
"npm": OPENAI_COMPATIBLE_NPM,
|
|
@@ -753,7 +799,7 @@ def build_opencode_config_patch(
|
|
|
753
799
|
),
|
|
754
800
|
"apiKey": api_key,
|
|
755
801
|
},
|
|
756
|
-
"models": {m:
|
|
802
|
+
"models": {m: _bedrock_model_entry(m) for m in BEDROCK_MANTLE_OPENAI_DEFAULT_MODELS},
|
|
757
803
|
}
|
|
758
804
|
runtime_models = [
|
|
759
805
|
with_inference_profile(m, resolved_region) for m in BEDROCK_RUNTIME_DEFAULT_BASE_MODELS
|
|
@@ -767,7 +813,7 @@ def build_opencode_config_patch(
|
|
|
767
813
|
),
|
|
768
814
|
"apiKey": api_key,
|
|
769
815
|
},
|
|
770
|
-
"models": {m:
|
|
816
|
+
"models": {m: _bedrock_model_entry(m) for m in runtime_models},
|
|
771
817
|
}
|
|
772
818
|
|
|
773
819
|
for ep in endpoints:
|
|
@@ -794,7 +840,9 @@ def build_opencode_config_patch(
|
|
|
794
840
|
for agent_name in PRIMARY_AGENTS:
|
|
795
841
|
agent_patch[agent_name] = {"model": qual_primary}
|
|
796
842
|
if prim_prov and prim_prov in providers_patch and prim_bare:
|
|
797
|
-
providers_patch[prim_prov].setdefault("models", {})[prim_bare] =
|
|
843
|
+
providers_patch[prim_prov].setdefault("models", {})[prim_bare] = _model_entry(
|
|
844
|
+
prim_prov, prim_bare
|
|
845
|
+
)
|
|
798
846
|
|
|
799
847
|
if effective_subagent:
|
|
800
848
|
qual_sub, sub_prov, sub_bare = _route_mantle_model(
|
|
@@ -805,12 +853,17 @@ def build_opencode_config_patch(
|
|
|
805
853
|
for agent_name in SUBAGENTS:
|
|
806
854
|
agent_patch[agent_name] = {"model": qual_sub}
|
|
807
855
|
if sub_prov and sub_prov in providers_patch and sub_bare:
|
|
808
|
-
providers_patch[sub_prov].setdefault("models", {})[sub_bare] =
|
|
856
|
+
providers_patch[sub_prov].setdefault("models", {})[sub_bare] = _model_entry(
|
|
857
|
+
sub_prov, sub_bare
|
|
858
|
+
)
|
|
809
859
|
|
|
810
860
|
if providers_patch:
|
|
811
861
|
patch["provider"] = providers_patch
|
|
812
862
|
if agent_patch:
|
|
813
863
|
patch["agent"] = agent_patch
|
|
864
|
+
if govcloud:
|
|
865
|
+
patch["disabled_providers"] = list(GOVCLOUD_DISABLED_PROVIDERS)
|
|
866
|
+
patch["enabled_providers"] = list(providers_patch)
|
|
814
867
|
|
|
815
868
|
return patch
|
|
816
869
|
|
|
@@ -858,6 +911,10 @@ def sync_opencode_config(
|
|
|
858
911
|
)
|
|
859
912
|
|
|
860
913
|
merged = deep_merge_dict(existing, patch)
|
|
914
|
+
disabled = patch.get("disabled_providers")
|
|
915
|
+
if disabled and isinstance(existing.get("disabled_providers"), list):
|
|
916
|
+
kept = [p for p in existing["disabled_providers"] if p not in disabled]
|
|
917
|
+
merged["disabled_providers"] = kept + list(disabled)
|
|
861
918
|
_drop_misrouted_mantle_models(merged)
|
|
862
919
|
merged.setdefault("$schema", OPENCODE_SCHEMA_URL)
|
|
863
920
|
target.write_text(json.dumps(merged, indent=2) + "\n", encoding="utf-8")
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
# aws_region: us-gov-west-1 # OpenCode only; aws.bedrock_region is used only in the same partition
|
|
29
29
|
# aws_profile: my-gov-profile # makes the short-term AWS_BEARER_TOKEN_BEDROCK
|
|
30
30
|
# model: openai.gpt-5.6-terra # plan + build agents; or openai.gpt-5.4, xai.grok-4.7
|
|
31
|
+
# # default: Terra/Luna commercial, openai.gpt-oss-120b GovCloud
|
|
31
32
|
# subagent_model: openai.gpt-5.6-luna # explore + general subagents
|
|
32
33
|
# claude_compat: false # true = also read CLAUDE.md and .claude/.agents skills
|
|
33
34
|
# local_chrome: false # Chrome DevTools MCP (same as --local-chrome)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|