Skip to content

Conversation

@lipido
Copy link
Contributor

@lipido lipido commented Aug 14, 2025

Since the inclusion of "gpt-5" and "gpt-4.1" conditions in the model family that generate different prompts (see agentPrompt.tsx and agentInstructions.tsx), this commit does tests for such families, improving coverage and updating snapshots.

  • Modified agentPrompt.spec.tsx to run tests for different model families ("default", "gpt-4.1", "gpt-5") using a loop.
  • Updated MockEndpoint instantiation across various test files to accept an optional family parameter.
  • Adjusted agentPromptToString function to handle family-specific endpoint creation.
  • Ensured all relevant tests are updated to reflect changes in endpoint creation and model family handling.
  • Cleaned up test cases for clarity and consistency.

Since the inclusion of "gpt-5" and "gpt-4.1" conditions in the model family that generate different prompts (see agentPrompt.tsx and agentInstructions.tsx), this commit does tests for such families, improving coverage and updating snapshots.

- Modified agentPrompt.spec.tsx to run tests for different model families ("default", "gpt-4.1", "gpt-5") using a loop.
- Updated MockEndpoint instantiation across various test files to accept an optional family parameter.
- Adjusted agentPromptToString function to handle family-specific endpoint creation.
- Ensured all relevant tests are updated to reflect changes in endpoint creation and model family handling.
- Cleaned up test cases for clarity and consistency.
@lipido
Copy link
Contributor Author

lipido commented Aug 14, 2025

@microsoft-github-policy-service agree

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Sure, thanks for being so passionate about unit tests 😄

fyi @bhavyaus

@roblourens roblourens added this to the August 2025 milestone Aug 17, 2025
@lipido
Copy link
Contributor Author

lipido commented Aug 17, 2025

Sure, thanks for being so passionate about unit tests 😄

fyi @bhavyaus

😄 Yep. In fact, I’d like to try refactoring the agent prompts to move all the “GPT-4.1” and “GPT-5” family-specific additions— and potentially any future ones—out of the generic prompt files. If more family-specific prompts are added, the agent-prompt system would become difficult to maintain. But first, I need to make sure that such a refactor wouldn’t cause any issues, so the first step is to ensure that the GPT-5 family prompts are generated during tests!

@roblourens
Copy link
Member

Sure. I agree that the dynamic inclusions make our prompts a bit hard to follow. I'm open to refactoring a bit to make it easier, even if it means a little duplication between prompts per family.

If you're going to spend a lot of time on it, I recommend opening an issue with a description of what you want to do so that I and @bhavyaus see it and can coordinate, I just wouldn't want you to waste time on anything.

@roblourens roblourens enabled auto-merge August 18, 2025 16:34
@roblourens roblourens added this pull request to the merge queue Aug 18, 2025
Merged via the queue into microsoft:main with commit 16f3dfb Aug 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants