Skip to content

feat: display model provider and default model throughout CLI#324

Merged
aidandaly24 merged 1 commit intomainfrom
feature/show-model-provider
Feb 18, 2026
Merged

feat: display model provider and default model throughout CLI#324
aidandaly24 merged 1 commit intomainfrom
feature/show-model-provider

Conversation

@aidandaly24
Copy link
Contributor

@aidandaly24 aidandaly24 commented Feb 17, 2026

Description

Display model provider and default model information throughout the CLI to improve user visibility into which models their agents will use.

Changes:

  • Add DEFAULT_MODEL_IDS constant mapping providers to human-readable model names
  • Show model name in TUI provider selection (e.g., "Anthropic (Claude Sonnet 4.5)")
  • Show model in Review Configuration confirm screen before create/add
  • Show model info in success screens after create/add agent
  • Show provider in dev TUI header, dev --logs, and dev --invoke
  • Show provider in invoke TUI and invoke CLI
  • Add modelProvider field to AgentEnvSpec schema for persistence
  • Standardize all SDK templates on newer models: gpt-4.1 and gemini-2.5-flash

Related Issue

Closes #231

Documentation PR

N/A - UI/UX improvement, no doc changes needed

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Manual testing:

  • Verified model shows in provider selection during agentcore create
  • Verified model shows in Review Configuration confirm screen
  • Verified model shows in success screen after agent creation
  • Verified provider shows in agentcore dev TUI header
  • Verified provider shows in agentcore dev --logs output
  • Verified provider shows in agentcore invoke TUI header

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

@aidandaly24 aidandaly24 requested a review from a team February 17, 2026 16:51
@jesseturner21
Copy link
Contributor

/strands review this pr, do not make any changes just review it and add comments

@jesseturner21
Copy link
Contributor

failing test, remember to go throught this check list
I ran npm run test:unit and npm run test:integ
I ran npm run typecheck
I ran npm run lint

@github-actions
Copy link
Contributor

Code Review Summary

I've reviewed this PR and overall it's a well-implemented feature with good code organization and consistent UX improvements. Here are my findings:

✅ Strengths

  • Clear data flow: schema → mapper → hooks → display
  • Backwards compatible with optional modelProvider field
  • Consistent display across all screens (create, dev, invoke)
  • Proper integration with existing hooks (useDevServer, useInvokeFlow)
  • Good test coverage for schema mapping logic

🔍 Suggestions for Improvement

1. Naming Clarity - DEFAULT_MODEL_IDS constant
The constant name DEFAULT_MODEL_IDS suggests these are model identifiers, but they're actually human-readable display names for the UI. Consider:

  • Renaming to DEFAULT_MODEL_DISPLAY_NAMES for clarity
  • The actual model IDs in templates differ (e.g., "gpt-4.1" vs "GPT-4.1", "claude-sonnet-4-5-20250929" vs "Claude Sonnet 4.5")

2. Inconsistent Capitalization
The display names have inconsistent capitalization:

  • "GPT-4.1" - All caps acronym + version
  • "Claude Sonnet 4.5" - Title case product name
  • "Gemini 2.5 Flash" - Title case product name

Consider standardizing the format for better consistency.

3. Comment Accuracy
In src/schema/constants.ts lines 17-19, the comment states:

"These are the models generated in agent templates"

This is slightly misleading since:

  • These are UI display names, not the actual model IDs used in templates
  • Templates use identifiers like "gpt-4.1", "claude-sonnet-4-5-20250929", "gemini-2.5-flash"

Suggested rewording: "Human-readable model names displayed in the CLI user interface"

4. Test Coverage
While schema-mapper tests are excellent, consider adding:

  • Unit tests for DEFAULT_MODEL_IDS to catch unintended changes
  • Tests verifying display logic uses these constants correctly

5. PR Description - Testing Checklist
Several testing items are unchecked:

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint

Were these run? If so, please check them off for completeness.

📋 Minor Observations

  • The model template updates (gpt-4.1, gemini-2.5-flash) are good but somewhat orthogonal to the display feature
  • All SDK templates should be verified for model updates (I spot-checked Strands)

✨ Overall Assessment

This is a solid implementation that improves user visibility into model configuration. The suggestions above are minor refinements that would further improve code clarity and maintainability. Nice work!


Let me know if you'd like me to clarify any of these points or if you'd like to discuss the suggestions!

@github-actions
Copy link
Contributor

Additional Review Notes

I've completed a thorough review of all the template files and can confirm:

✅ All SDK Templates Correctly Updated

  • Strands: ✓ gpt-4.1, gemini-2.5-flash, claude-sonnet-4-5-20250929
  • LangChain/LangGraph: ✓ gpt-4.1, gemini-2.5-flash, claude-sonnet-4-5-20250929
  • CrewAI: ✓ openai/gpt-4.1, gemini/gemini-2.5-flash (with provider prefixes)
  • OpenAI Agents: ✓ gpt-4.1

Code Flow Verification ✅

Verified the complete data flow:

  1. Schema Layer (agent-env.ts): modelProvider field added as optional
  2. Mapper Layer (schema-mapper.ts): Field correctly persisted at line 115
  3. Hook Layer (useDevServer.ts, useInvokeFlow.ts): Provider correctly retrieved
  4. Display Layer: Consistently shown across all screens:
    • Create flow: Shows in confirmation and success screens
    • Dev mode: Shows in TUI header and CLI output
    • Invoke: Shows in TUI and CLI output

Integration Points ✅

  • dev --invoke: Correctly displays provider (line 74 in dev/command.tsx)
  • invoke CLI: Correctly displays provider (line 65 in invoke/command.tsx)
  • All display logic uses the schema field, not hardcoded values

The implementation is solid and complete. My main suggestions from the previous comment still stand (naming clarity and test coverage), but these are minor improvements that don't affect functionality.

Great work on the comprehensive implementation! 🎉

notgitika
notgitika previously approved these changes Feb 17, 2026
Copy link
Contributor

@notgitika notgitika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment but an overall nit: The gpt-4o -> gpt-4.1 and the gemini one changes affect what gets scaffolded for new projects (different cost/capability). Worth calling out separately in the PR description since they're bundled with the display-name feature but are independent behavioral changes.

I would also prefer that the actual full model ID be shown to the user at all times so they don't have to check inside the code each time but thats just my opinion

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 28.26% 1808 / 6396
🔵 Statements 27.6% 1876 / 6797
🔵 Functions 27.34% 356 / 1302
🔵 Branches 24.52% 918 / 3743
Generated in workflow #414 for commit 1c45cad by the Vitest Coverage Report Action

- Add DEFAULT_MODEL_IDS constant mapping providers to model IDs
- Show model in TUI provider selection (e.g., 'Anthropic (claude-sonnet-4-5-20250514)')
- Show model in Review Configuration confirm screen
- Show model info in success screens after create/add agent
- Show provider in dev TUI, dev --logs, dev --invoke
- Show provider in invoke TUI and invoke CLI
- Add modelProvider field to AgentEnvSpec schema for persistence
- Update OpenAI templates from gpt-4o to gpt-4.1
- Update Gemini templates from gemini-2.0-flash to gemini-2.5-flash
@aidandaly24 aidandaly24 force-pushed the feature/show-model-provider branch from 80c8142 to 1c45cad Compare February 18, 2026 14:30
@aidandaly24 aidandaly24 merged commit d97fa83 into main Feb 18, 2026
15 checks passed
@aidandaly24 aidandaly24 deleted the feature/show-model-provider branch February 18, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display the default model in use

3 participants

Comments