Skip to content

Migrate FixCode tool

Igor Drozdov requested to merge id-migrate-fix-code-prompt into master

What does this MR do and why?

Migrate Duo Chat Tools: FixCode (#475047)

In this MR, we:

  • Add prompt_migration_fix_code FF
  • Migrate the FixCode tool to use the AIGW
  • Use UseAiGatewayAgentPrompt concern with a FF

How to set up and validate locally

  • Run AI Gateway with Anthropic debug: ANTHROPIC_LOG=debug poetry run ai_gateway
  • Checkout id-fix-code-prompts in the AIGW
  • Enable prompt_migration_fix_code feature flag on Rails (::Feature.enable(:prompt_migration_fix_code))
  • Perform /fix slash command in Duo Chat, eg.. /fix def hello_world(): print("Hello, World!")
  • Verify that /v1/prompts/chat/fix_code endpoint is called in the AIGW
  • Verify that the correct prompt is sent to Anthropic
Edited by Igor Drozdov

Merge request reports