Skip to content

Commit 9d42b34

Browse files
authored
Update processor argument and auth header format (#294)
Replaces 'auth_request_processor' with 'run_processor' in agent initialization for consistency. Removes 'Bearer' prefix from Authorization header when using API key in generate_headers.
1 parent d98821c commit 9d42b34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/content/91.auth/4.oauth2-user-federation-outbound.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ cloud_assistant_tools = VeIdentityMcpToolset(
146146
agent = Agent(
147147
tools=[ecs_tools, cloud_assistant_tools],
148148
system_prompt="你是火山引擎ECS助手,可以查询ECS实例信息并执行服务器命令。",
149-
auth_request_processor=AuthRequestProcessor(),
149+
run_processor=AuthRequestProcessor(),
150150
)
151151

152152
asyncio.run(

veadk/integrations/ve_identity/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def generate_headers(credential: AuthCredential) -> Optional[dict[str, str]]:
144144
)
145145
}
146146
elif credential.api_key:
147-
headers = {"Authorization": f"Bearer {credential.api_key}"}
147+
headers = {"Authorization": credential.api_key}
148148
elif credential.service_account:
149149
pass
150150

0 commit comments

Comments
 (0)