Commit Graph

7 Commits

Author SHA1 Message Date
Jordan Ritter fada109b72 Merge remote-tracking branch 'origin/main' into blitz/cvdiag-observability/integration
# Conflicts:
#	showcase/integrations/ms-agent-harness-dotnet/agent/BeautifulChatAgent.csproj
2026-06-19 13:51:02 -07:00
Jordan Ritter 6ddc85f7ee feat(showcase): port ms-agent-harness-dotnet backend agents on the AsHarnessAgent construction surface 2026-06-19 02:28:22 -07:00
Jordan Ritter 3737e6ac01 feat(cvdiag): backend 11-boundary instrumentation for 2 .NET integrations (L1-F) 2026-06-18 14:28:38 -07:00
Jordan Ritter bd77954ab5 feat(showcase): instrument per-framework x-aimock-context forwarding with gated CVDIAG breadcrumb
Add CVDIAG logging + x-diag-hops breadcrumb (route-<fw>/backend-<fw>) at each forwarding hop across LangGraph (py/ts/fastapi), google-adk, the self-contained Node + Python shims, spring-ai (Java) and ms-agent (.NET). Breadcrumb append is gated on diagnostic-header presence so non-diagnostic traffic stays byte-identical; surfaces previously-silent forwarding misses (empty configurable, missing httpx event-hooks target, swallowed hook-install errors).
2026-06-06 10:40:25 -07:00
Jordan Ritter c974b01721 fix(showcase/ms-agent-harness-dotnet): unify endpoint resolution between primary and secondary clients
Program.cs#CreateOpenAiClient previously read the OpenAI endpoint solely from
the OPENAI_BASE_URL environment variable and fell back to
ApiKeyResolver.DefaultOpenAiEndpoint. The secondary tool-calling HTTP client
(A2uiSecondaryToolCaller) instead routes through ApiKeyResolver.ResolveEndpoint,
which checks env, then configuration[OPENAI_BASE_URL] (appsettings.json /
user-secrets), then the default.

When OPENAI_BASE_URL was supplied only via configuration (e.g. user-secrets in
local dev), the primary client silently dialed the public Azure-hosted models
endpoint while the secondary client dialed the configured aimock. The two
endpoints diverged with no visible signal, breaking aimock-routed flows and
masking misconfigurations.

Switch CreateOpenAiClient to call ApiKeyResolver.ResolveEndpoint so both
clients share a single source of truth. Logging is preserved and now reports
which source supplied the endpoint (env, configuration, or default).
2026-05-26 13:36:38 -07:00
Jordan Ritter a939054d8a fix(showcase/ms-agent-harness-dotnet): harden A2uiSecondaryToolCaller + centralize API key resolution
- Replace silent `return null` paths in A2uiSecondaryToolCaller with
  TryGetProperty guards that each emit a structured LogWarning naming
  the exact missing/unexpected field (choices, message, tool_calls,
  function, name mismatch, arguments). Callers can now tell why a
  design-tool call produced no content.
- Add ILogger parameter to GetDesignToolArgumentsAsync and pass
  BeautifulChatAgent._logger from the single call site so warnings
  flow into the existing log stream.
- Log the response body (truncated to 1 KB) at LogWarning before
  EnsureSuccessStatusCode throws, so upstream error payloads survive
  the throw and reach operators.
- Extract the OPENAI_API_KEY/GitHubToken/sk-mock-local fallback chain
  from Program.cs and A2uiSecondaryToolCaller.cs into a new
  ApiKeyResolver helper. Both call sites now share one implementation.
- ApiKeyResolver fails fast with InvalidOperationException + LogCritical
  when no real key is present and OPENAI_BASE_URL is not an
  aimock/localhost endpoint, so misconfigured prod deploys cannot
  silently send sk-mock-local to a real LLM provider. The silent
  mock-key fallback is preserved for aimock/localhost dev endpoints.
2026-05-26 13:36:38 -07:00
Alem Tuzlak 2405a46fa6 feat(showcase): add ms agent harness dotnet chat 2026-05-26 13:36:38 -07:00