dify/api/models
Taranum01 cc557867a4 fix(model): re-sign bare/backticked tool file URLs in answer
The agent runtime may emit tool file URLs in three shapes: a
markdown link [text](url), a backticked URL `url`, or a bare URL.
The current re_sign_file_url_answer only matches the markdown form, so
bare and backticked tool file URLs keep the long-lived INTERNAL_FILES_URL
host and 5xx at serve time. The re_sign is only meaningful at the
URL-form branch, so this is purely a regex widening.

Split the common /files/.../timestamp=&nonce=&sign= core into a named
subpattern, then run it three times in the answer string:
- markdown link: [text](url)
- backticked URL: `url`
- bare URL

The rest of the function (URL classification into tools/ vs upload vs
image-preview, sign + rewire) is unchanged.

Refs #40788
2026-08-14 23:19:19 +05:30
..
utils chore(api): Upgrade graphon to v0.5.1 (#37168) 2026-06-11 07:37:27 +00:00
__init__.py feat: app deployment v2 (#39829) 2026-08-12 01:55:36 +00:00
_workflow_exc.py feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
account.py chore(api): consolidate chained .where() calls into single calls (#39819) 2026-07-30 16:59:50 +00:00
agent_config_entities.py fix(agent): preserve plugin-declared model parameters through Agent Soul (#40163) 2026-08-09 08:48:01 +00:00
agent.py feat(agent): make home snapshots optional and use backend defaults (#39702) 2026-07-29 02:01:12 +00:00
api_based_extension.py fix: use default_factory for callable defaults in ORM dataclasses (#28730) 2025-11-27 09:39:49 +09:00
base.py ci: add flag for linter (#37018) 2026-06-08 04:53:12 +00:00
comment.py chore: port WorkflowComment (#36039) 2026-05-11 09:17:12 +00:00
credential_permission.py feat: per-credential visibility control for plugin credentials (#35468) 2026-06-01 05:56:18 +00:00
dataset.py fix(api): bind remaining RAG resources to owners (#40503) 2026-08-12 06:05:16 +00:00
engine.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
enums.py fix(api): tolerate legacy service_api end-user type on load (#38271) 2026-07-02 05:34:36 +00:00
execution_extra_content.py refactor: migrate execution extra content repository tests from mocks to testcontainers (#33852) 2026-03-23 17:32:11 +09:00
human_input.py chore(api): upgrade graphon to v0.6.0, migrate HITL logic back to Dify (#38247) 2026-07-03 03:45:21 +00:00
model.py fix(model): re-sign bare/backticked tool file URLs in answer 2026-08-14 23:19:19 +05:30
oauth.py feat: per-credential visibility control for plugin credentials (#35468) 2026-06-01 05:56:18 +00:00
onboarding.py feat(web): add step-by-step tour shell (#38785) 2026-07-20 09:23:25 +00:00
provider_ids.py ci: add flag for linter (#37018) 2026-06-08 04:53:12 +00:00
provider.py ci: add flag for linter (#37018) 2026-06-08 04:53:12 +00:00
snippet.py feat: snippet (#37046) 2026-06-05 09:38:42 +00:00
source.py refactor: replace bare dict with dict[str, Any] in models, providers, extensions, libs, and test utilities (#35186) 2026-04-14 17:51:25 +00:00
task.py fix: use default_factory for callable defaults in ORM dataclasses (#28730) 2025-11-27 09:39:49 +09:00
tools.py feat(api): add MCP user-identity forwarding (#36839) 2026-06-08 04:32:11 +00:00
trigger.py fix(models): correct onupdate typo on trigger.py updated_at columns (#38341) 2026-07-04 17:14:01 +00:00
types.py chore: port isinstance to match case (#37271) 2026-06-18 00:18:03 +00:00
web.py refactor(api): Query API to select function_1 (#33565) 2026-03-17 23:29:16 +09:00
workflow.py feat: app deployment v2 (#39829) 2026-08-12 01:55:36 +00:00