Fix Bedrock advocate synthesis: engine guard, response_format, Claude engine option

- DeepResearchAgent: engine guard now accepts dbn_legal_v3, claude_sonnet, claude_haiku
  (previously stripped these to azure_mini, breaking dbn_legal_v3 selection and
  preventing Claude engines from reaching the correct synthesis branch)
- DbnBedrockGateway: remove response_format=json_object from chat payload — LiteLLM
  converts this to a tool-use constraint for Bedrock, routing output into tool_calls
  instead of content (root cause of the {} empty brief)
- advocate.php: add Claude Sonnet 4.6 (AWS Bedrock) engine option
- account, billing, dashboard, nav, min-sak: pending UI/flow changes from prior sessions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 20:22:12 +02:00
parent 8205a22205
commit b78ab1e257
8 changed files with 1226 additions and 802 deletions
+3 -82
View File
@@ -289,7 +289,7 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
</div>
<div class="dash-overview-bar__right">
<?php if ($isPaid): ?>
<a href="/billing.php" class="dash-overview-bar__action dash-overview-bar__action--manage"><?= htmlspecialchars($dl['manage_plan']) ?></a>
<a href="/account.php#plan" class="dash-overview-bar__action dash-overview-bar__action--manage"><?= htmlspecialchars($dl['manage_plan']) ?></a>
<?php else: ?>
<a href="/pricing.php" class="dash-overview-bar__action dash-overview-bar__action--upgrade"><?= htmlspecialchars($dl['upgrade_plan']) ?> →</a>
<?php endif; ?>
@@ -302,10 +302,10 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<div class="status-card" style="background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:1.3rem 1.5rem;">
<p style="margin:0; color:#6b7280; font-size:.95rem; text-transform:uppercase; letter-spacing:.06em;"><?= htmlspecialchars(dbnToolsT('credits_available', $uiLang)) ?></p>
<p style="margin:.35rem 0 0; font-size:2rem; font-weight:700; color:#00205B;"><?= number_format($eff, 0, ',', ' ') ?></p>
<p style="margin:0; color:#6b7280; font-size:.95rem;"><?= (int)$dashDetail['balance'] ?> <?= htmlspecialchars(dbnToolsT('credits_monthly', $uiLang)) ?> · <?= (int)$dashDetail['bonus_balance'] ?> <?= $uiLang === 'no' ? 'forhåndsbetalte' : 'prepaid' ?> · <a href="/billing.php"><?= htmlspecialchars(dbnToolsT('details_link', $uiLang)) ?></a></p>
<p style="margin:0; color:#6b7280; font-size:.95rem;"><?= (int)$dashDetail['balance'] ?> <?= htmlspecialchars(dbnToolsT('credits_monthly', $uiLang)) ?> · <?= (int)$dashDetail['bonus_balance'] ?> <?= $uiLang === 'no' ? 'forhåndsbetalte' : 'prepaid' ?> · <a href="/account.php#plan"><?= htmlspecialchars(dbnToolsT('details_link', $uiLang)) ?></a></p>
</div>
<?php if ($isPaid): ?>
<a class="status-card" href="/min-sak.php" style="background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:1.3rem 1.5rem; text-decoration:none; color:inherit;">
<a class="status-card" href="/account.php#case" style="background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:1.3rem 1.5rem; text-decoration:none; color:inherit;">
<p style="margin:0; color:#6b7280; font-size:.95rem; text-transform:uppercase; letter-spacing:.06em;"><?= htmlspecialchars(dbnToolsT('my_case', $uiLang)) ?></p>
<p style="margin:.35rem 0 0; font-size:1.55rem; font-weight:700; color:#00205B;"><?= htmlspecialchars(dbnToolsT('build_your_case', $uiLang)) ?> →</p>
<?php
@@ -337,85 +337,6 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<?php endif; ?>
</section>
<section id="account" class="dashboard-account-grid" aria-label="Account and profile">
<article class="dash-account-panel dash-account-panel--profile">
<div class="dash-account-panel__head">
<div>
<p class="dash-section-kicker">Account</p>
<h2>Profile details</h2>
</div>
<span class="dash-account-chip">Optional</span>
</div>
<form id="profileForm" class="dash-profile-form">
<label>
<span>Display name</span>
<input name="display_name" type="text" maxlength="100" autocomplete="name" value="<?= htmlspecialchars($dashProfileValue('display_name')) ?>">
</label>
<label>
<span>Phone</span>
<input name="phone" type="tel" maxlength="40" autocomplete="tel" value="<?= htmlspecialchars($dashProfileValue('phone')) ?>">
</label>
<label class="span-2">
<span>Address line 1</span>
<input name="address_line1" type="text" maxlength="180" autocomplete="address-line1" value="<?= htmlspecialchars($dashProfileValue('address_line1')) ?>">
</label>
<label class="span-2">
<span>Address line 2</span>
<input name="address_line2" type="text" maxlength="180" autocomplete="address-line2" value="<?= htmlspecialchars($dashProfileValue('address_line2')) ?>">
</label>
<label>
<span>Postal code</span>
<input name="postal_code" type="text" maxlength="32" autocomplete="postal-code" value="<?= htmlspecialchars($dashProfileValue('postal_code')) ?>">
</label>
<label>
<span>City</span>
<input name="city" type="text" maxlength="100" autocomplete="address-level2" value="<?= htmlspecialchars($dashProfileValue('city')) ?>">
</label>
<label>
<span>Region</span>
<input name="address_region" type="text" maxlength="100" autocomplete="address-level1" value="<?= htmlspecialchars($dashProfileValue('address_region')) ?>">
</label>
<label>
<span>Country</span>
<input name="country" type="text" maxlength="2" autocomplete="country" placeholder="NO" value="<?= htmlspecialchars($dashProfileValue('country')) ?>">
</label>
<input type="hidden" name="preferred_language" value="<?= htmlspecialchars($uiLang) ?>">
<div class="dash-profile-actions span-2">
<button type="submit" class="dash-profile-save">Save profile</button>
<p id="profileStatus" class="dash-profile-status" role="status" aria-live="polite"></p>
</div>
</form>
</article>
<article class="dash-account-panel">
<div class="dash-account-panel__head">
<div>
<p class="dash-section-kicker">Users</p>
<h2>Workspace access</h2>
</div>
<span class="dash-account-chip"><?= htmlspecialchars($tierLabel[0]) ?></span>
</div>
<div class="dash-account-list">
<div>
<span>Email</span>
<strong><?= htmlspecialchars((string)($dashAuthUser['email'] ?? '')) ?></strong>
</div>
<div>
<span>Seats</span>
<strong><?= htmlspecialchars($dashTeamLabel) ?></strong>
</div>
<div>
<span>Role</span>
<strong>Owner</strong>
</div>
<div>
<span>Plan storage</span>
<strong><?= $isPaid ? htmlspecialchars(round((int)$dashDetail['storage_quota_bytes'] / 1048576) . ' MB') : 'Upgrade for My Case storage' ?></strong>
</div>
</div>
<p class="dash-account-note">Team invitations and seat management will be added after this consolidation pass.</p>
</article>
</section>
<?php endif; ?>
<div class="disclaimer" role="note"><?= htmlspecialchars(dbnToolsT('disclaimer', $uiLang)) ?></div>