Skip to content

Commit d31fb3f

Browse files
author
Yuriy
committed
chore(java-spring-ai-agents): update MCP and agent runtime configurations
1 parent 025e397 commit d31fb3f

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/java-spring-ai-agents/scripts/06-mcp-gateway.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ if ! grep -q "GATEWAY_URL=" ~/environment/.envrc 2>/dev/null; then
149149
fi
150150

151151
# Write MCP client config to application.properties
152-
grep -q "spring.ai.mcp.client.streamablehttp.connections.gateway.url" ~/environment/aiagent/src/main/resources/application.properties 2>/dev/null || \
152+
grep -q "spring.ai.mcp.client.streamable-http.connections.gateway.url" ~/environment/aiagent/src/main/resources/application.properties 2>/dev/null || \
153153
cat >> ~/environment/aiagent/src/main/resources/application.properties << PROPS
154154
155155
# MCP Client
156156
spring.ai.mcp.client.toolcallback.enabled=true
157157
spring.ai.mcp.client.initialized=false
158-
spring.ai.mcp.client.streamablehttp.connections.gateway.url=${GATEWAY_URL}
158+
spring.ai.mcp.client.streamable-http.connections.gateway.url=${GATEWAY_URL}
159159
PROPS
160160

161161
## Adding the backoffice target

apps/java-spring-ai-agents/scripts/08-aiagent-runtime.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ if [ "${EXISTING_RUNTIME_ID}" != "None" ] && [ -n "${EXISTING_RUNTIME_ID}" ]; th
185185
--agent-runtime-artifact "{\"containerConfiguration\":{\"containerUri\":\"${ECR_URI}:latest\"}}" \
186186
--network-configuration "{\"networkMode\":\"VPC\",\"networkModeConfig\":{\"subnets\":[\"${SUBNET_ID}\"],\"securityGroups\":[\"${SG_ID}\"]}}" \
187187
--authorizer-configuration "{\"customJWTAuthorizer\":{\"discoveryUrl\":\"${AIAGENT_DISCOVERY_URL}\",\"allowedClients\":[\"${AIAGENT_CLIENT_ID}\"]}}" \
188-
--request-header-configuration '{"requestHeaderAllowlist":["Authorization","X-Amzn-Bedrock-AgentCore-Runtime-Session-Id"]}' \
188+
--request-header-configuration '{"requestHeaderAllowlist":["Authorization"]}' \
189189
--region ${AWS_REGION} \
190190
--no-cli-pager
191191

@@ -204,7 +204,7 @@ else
204204
--agent-runtime-artifact "{\"containerConfiguration\":{\"containerUri\":\"${ECR_URI}:latest\"}}" \
205205
--network-configuration "{\"networkMode\":\"VPC\",\"networkModeConfig\":{\"subnets\":[\"${SUBNET_ID}\"],\"securityGroups\":[\"${SG_ID}\"]}}" \
206206
--authorizer-configuration "{\"customJWTAuthorizer\":{\"discoveryUrl\":\"${AIAGENT_DISCOVERY_URL}\",\"allowedClients\":[\"${AIAGENT_CLIENT_ID}\"]}}" \
207-
--request-header-configuration '{"requestHeaderAllowlist":["Authorization","X-Amzn-Bedrock-AgentCore-Runtime-Session-Id"]}' \
207+
--request-header-configuration '{"requestHeaderAllowlist":["Authorization"]}' \
208208
--region ${AWS_REGION} \
209209
--no-cli-pager \
210210
--query 'agentRuntimeId' --output text)

apps/java-spring-ai-agents/scripts/12-aiagent-redeploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ aws bedrock-agentcore-control update-agent-runtime \
6262
--agent-runtime-artifact "{\"containerConfiguration\":{\"containerUri\":\"${ECR_URI}:latest\"}}" \
6363
--network-configuration "{\"networkMode\":\"VPC\",\"networkModeConfig\":{\"subnets\":[\"${SUBNET_ID}\"],\"securityGroups\":[\"${SG_ID}\"]}}" \
6464
--authorizer-configuration "{\"customJWTAuthorizer\":{\"discoveryUrl\":\"${AIAGENT_DISCOVERY_URL}\",\"allowedClients\":[\"${AIAGENT_CLIENT_ID}\"]}}" \
65-
--request-header-configuration '{"requestHeaderAllowlist":["Authorization","X-Amzn-Bedrock-AgentCore-Runtime-Session-Id"]}' \
65+
--request-header-configuration '{"requestHeaderAllowlist":["Authorization"]}' \
6666
--region ${AWS_REGION} \
6767
--no-cli-pager
6868

0 commit comments

Comments
 (0)