dialogflow: add enable_response_debug_info to ConversationProfile feature_configs (#26002)#68
Open
jbbqqf wants to merge 11 commits into
Open
dialogflow: add enable_response_debug_info to ConversationProfile feature_configs (#26002)#68jbbqqf wants to merge 11 commits into
jbbqqf wants to merge 11 commits into
Conversation
…ture_configs (#26002) Surface the optional enableResponseDebugInfo boolean on each feature_configs[] entry under both human_agent_suggestion_config and end_user_suggestion_config. The Dialogflow ES REST API has supported this field for a while; it adds debug information to the suggestion response, which is useful when a customer is troubleshooting why a specific suggestion was returned. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the optional
enable_response_debug_infoboolean to eachfeature_configs[]entry ofgoogle_dialogflow_conversation_profile(under bothhuman_agent_suggestion_configandend_user_suggestion_config). The Dialogflow ES REST API has long supportedenableResponseDebugInfoonSuggestionFeatureConfig; this field was simply missing from the mmv1 schema.Fixes hashicorp/terraform-provider-google#26002 — see hashicorp/terraform-provider-google#26002
Why
When a customer is troubleshooting why a particular Dialogflow suggestion was (or wasn't) returned for a feature like
KNOWLEDGE_ASSISTorARTICLE_SUGGESTION, the API can attach debug information to the response when this flag is set. Today users have to flip it via the UI orgcloud, and the nextterraform applyclobbers it.GCP API reference:
ConversationProfile: https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.conversationProfilesSuggestionFeatureConfig: https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.conversationProfiles#suggestionfeatureconfig —enableResponseDebugInfois documented there.What changed
mmv1/products/dialogflow/ConversationProfile.yaml— one new Boolean property added in two structurally-identical places:human_agent_suggestion_config.feature_configs[].enable_response_debug_infoend_user_suggestion_config.feature_configs[].enable_response_debug_infoThe fields are optional; not setting them leaves the API behavior unchanged from today.
Edge cases tested
feature_configs { suggestion_feature { type = "ARTICLE_SUGGESTION" } }IsEmptyValueguardtrueon a single featureenable_response_debug_info = truehuman_agent_suggestion_configandend_user_suggestion_configThis is additive schema with no behavior change. Live smoke against ConversationProfile creation was skipped because the surrounding setup (Dialogflow agent + KnowledgeBase) is heavy and the gap (
Unsupported argument) is provable purely fromterraform validate.Test protocol
go run ./mmv1 -product=dialogflow -version=gago run ./mmv1 -product=dialogflow -version=betago build ./google/services/dialogflow/...(TPG, with regenerated file)go build ./google-beta/services/dialogflow/...(TPGB)go vet(both providers)unreachable codewarning inresource_dialogflow_encryption_spec.go:261is unrelated and present on origin/mainDisclosure
This PR was implemented with assistance from Claude Code. The diff was reviewed manually against the GCP API documentation linked above.
The author (a human) reviewed the diff and the generator output before opening this PR.