You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/agentic_platform/ has Claude and Nova model IDs hardcoded inline across several files. At least one of these (BasePrompt.model_id) is a legacy Bedrock model ID — calls to it now fail with:
```
ResourceNotFoundException: Access denied. This Model is marked by provider as Legacy and you have not been actively using the model in the last 30 days. Please upgrade to an active model on Amazon Bedrock
```
Even the non-legacy IDs are drift hazards: the same bump chore we just tackled in labs/ (tracked in #50) will recur here whenever a model hits end-of-life.
Occurrences
Legacy / known-problematic
`src/agentic_platform/core/models/prompt_models.py:4` — `HAIKU_MODEL_ID = "us.anthropic.claude-3-haiku-20240307-v1:0"` (legacy; this is the one that triggered the ResourceNotFoundException from a lab notebook).
`src/agentic_platform/agent/agentic_chat/prompt/agentic_chat_prompt.py:60` — same legacy Haiku 3 ID.
Other hardcoded IDs (not necessarily legacy today, but still drift-prone)
`src/agentic_platform/service/litellm_gateway/litellm_config.yaml` — multiple model-name / routing entries, several tied to older Sonnet 3.5 / Haiku 3 IDs.
Impact
`BasePrompt` inherits a legacy Haiku 3 default, so every downstream class that doesn't override `model_id` fails at runtime. This surfaced when a lab notebook (`labs/module2/notebooks/3_routing.ipynb`) called `bedrock.converse()` via `prompt.model_id`.
`litellm_config.yaml` drifts from the Python defaults silently (different teams edit it at different times).
Proposed fix
Mirror the approach that's now in place for `labs/`:
Single source of truth in `src/` — add `src/agentic_platform/core/models/model_config.py` (or promote the existing `HAIKU_MODEL_ID` constant into a real config module) with constants for each model role:
Replace hardcoded literals in every `prompt_models.py` / `_agent.py` / `_prompt.py` with imports from that module.
Keep `litellm_config.yaml` in lockstep — either template it from the Python constants at build time, or add a CI check that fails if the two disagree.
(Optional) drift check — extend the existing `scripts/migrate_model_ids.py` audit to also scan `src/` for hardcoded `anthropic.claude-` / `amazon.nova-` literals. That script is used by the labs cleanup and already does the right thing for notebooks; adding `.py` / `.yaml` coverage would make it CI-ready.
Context
Scope for this issue is deliberately limited to `src/agentic_platform/` — the lab-side cleanup is complete (lab notebooks now import from `labs_common`, and a `LabsBasePrompt` subclass overrides the legacy default from the current `BasePrompt`).
The lab-side fix is intentionally read-only from `src/`'s perspective: it subclasses `BasePrompt` and pins `model_id`, rather than mutating the platform class. This issue is for the properly-scoped follow-up inside `src/` itself.
Problem
src/agentic_platform/has Claude and Nova model IDs hardcoded inline across several files. At least one of these (BasePrompt.model_id) is a legacy Bedrock model ID — calls to it now fail with:```
ResourceNotFoundException: Access denied. This Model is marked by provider as Legacy and you have not been actively using the model in the last 30 days. Please upgrade to an active model on Amazon Bedrock
```
Even the non-legacy IDs are drift hazards: the same bump chore we just tackled in
labs/(tracked in #50) will recur here whenever a model hits end-of-life.Occurrences
Legacy / known-problematic
Other hardcoded IDs (not necessarily legacy today, but still drift-prone)
Impact
Proposed fix
Mirror the approach that's now in place for `labs/`:
Single source of truth in `src/` — add `src/agentic_platform/core/models/model_config.py` (or promote the existing `HAIKU_MODEL_ID` constant into a real config module) with constants for each model role:
```python
HAIKU_MODEL_ID = "us.anthropic.claude-haiku-4-5-20251001-v1:0"
SONNET_MODEL_ID = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
NOVA_LITE_MODEL_ID = "us.amazon.nova-lite-v1:0"
```
Replace hardcoded literals in every `prompt_models.py` / `_agent.py` / `_prompt.py` with imports from that module.
Keep `litellm_config.yaml` in lockstep — either template it from the Python constants at build time, or add a CI check that fails if the two disagree.
(Optional) drift check — extend the existing `scripts/migrate_model_ids.py` audit to also scan `src/` for hardcoded `anthropic.claude-` / `amazon.nova-` literals. That script is used by the labs cleanup and already does the right thing for notebooks; adding `.py` / `.yaml` coverage would make it CI-ready.
Context