fix: model for false promise harness (#14824)

fixes model for false promise harness
This commit is contained in:
Aakash Bakhle
2026-06-23 18:42:34 +05:30
committed by GitHub
parent 84fda8a323
commit 0af9900be2
2 changed files with 13 additions and 7 deletions
@@ -1,4 +1,6 @@
class Captain::Llm::AssistantFalsePromiseService < Llm::BaseAiService
DETECTOR_MODEL = 'gpt-5.2'.freeze
include Integrations::LlmInstrumentation
include Captain::Llm::AssistantResponseInspectionHelpers
@@ -35,6 +37,10 @@ class Captain::Llm::AssistantFalsePromiseService < Llm::BaseAiService
private
def setup_model
@model = DETECTOR_MODEL
end
def normalize_response(parsed, raw_content)
decision = parsed['decision'].to_s
reason = parsed['reason'].to_s
@@ -82,7 +82,7 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
).and_return({
'decision' => 'safe',
'reason' => 'safe_response',
'model' => 'gpt-4.1'
'model' => Captain::Llm::AssistantFalsePromiseService::DETECTOR_MODEL
})
described_class.perform_now(conversation, assistant)
@@ -103,12 +103,12 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
{
'decision' => 'future_work_promise',
'reason' => 'future_check_or_investigation',
'model' => 'gpt-4.1'
'model' => Captain::Llm::AssistantFalsePromiseService::DETECTOR_MODEL
},
{
'decision' => 'safe',
'reason' => 'asks_user_to_check_or_provide_info',
'model' => 'gpt-4.1'
'model' => Captain::Llm::AssistantFalsePromiseService::DETECTOR_MODEL
}
)
@@ -143,7 +143,7 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
allow(mock_false_promise_service).to receive(:detect).and_return({
'decision' => 'future_work_promise',
'reason' => 'future_check_or_investigation',
'model' => 'gpt-4.1'
'model' => Captain::Llm::AssistantFalsePromiseService::DETECTOR_MODEL
})
described_class.perform_now(conversation, assistant)
@@ -165,13 +165,13 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
{
'decision' => 'future_work_promise',
'reason' => 'future_check_or_investigation',
'model' => 'gpt-4.1'
'model' => Captain::Llm::AssistantFalsePromiseService::DETECTOR_MODEL
},
{
'decision' => nil,
'reason' => nil,
'error' => 'verification timeout',
'model' => 'gpt-4.1'
'model' => Captain::Llm::AssistantFalsePromiseService::DETECTOR_MODEL
}
)
@@ -192,7 +192,7 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
allow(mock_false_promise_service).to receive(:detect).and_return({
'decision' => 'future_work_promise',
'reason' => 'future_check_or_investigation',
'model' => 'gpt-4.1'
'model' => Captain::Llm::AssistantFalsePromiseService::DETECTOR_MODEL
})
described_class.perform_now(conversation, assistant)